home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre4.z / postgre4 / src / lib / H / obsolete / cat.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-27  |  14.1 KB  |  751 lines

  1. /*
  2.  * cat.h --
  3.  *    POSTGRES system catalog definitions.
  4.  *
  5.  * Identification:
  6.  *    $Header: /private/postgres/src/lib/H/obsolete/RCS/cat.h,v 1.15 1991/03/26 17:21:28 kemnitz Exp $
  7.  */
  8.  
  9. #ifndef    CatIncluded        /* Include this file only once */
  10. #define CatIncluded    1
  11.  
  12. /* ----------------
  13.  *    include files needed for system types
  14.  * ----------------
  15.  */
  16. #include "tmp/postgres.h"    /* XXX for Boolean and ABSTIME */
  17.  
  18. #include "access/attnum.h"
  19. #include "access/istrat.h"
  20.  
  21. /* ----------------------------------------------------------------
  22.  *    soon to be obsolete system tuple structure definitions
  23.  * ----------------------------------------------------------------
  24.  */
  25.  
  26. /* ----------------
  27.  *    RelationTupleForm
  28.  * ----------------
  29.  */
  30. #ifndef RelationTupleForm_Defined
  31. #define RelationTupleForm_Defined 1
  32.  
  33. typedef struct RelationTupleFormD {
  34.     NameData    relname;
  35.     ObjectId    relowner;
  36.     ObjectId    relam;
  37.     uint32        relpages;
  38.     uint32        reltuples;
  39.     ABSTIME        relexpires;
  40.     RELTIME        relpreserved;
  41.     Boolean        relhasindex;
  42.     Boolean        relisshared;
  43.     char        relkind;
  44.     char        relarch;
  45.     AttributeNumber    relnatts;
  46.     AttributeNumber    relkey[8];
  47.     ObjectId    relkeyop[8];
  48.     struct varlena  relstub; /* XXX this should be Prs2RawStub... */
  49. /*    LOCK    rellock; */
  50. /*    SPQUEL    reldesc; */
  51. } RelationTupleFormD;
  52.  
  53. typedef RelationTupleFormD    *RelationTupleForm;
  54.  
  55. #endif RelationTupleForm_Defined
  56.  
  57. /* ----------------
  58.  *    AttributeTupleForm
  59.  * ----------------
  60.  */
  61. #ifndef AttributeTupleForm_Defined
  62. #define AttributeTupleForm_Defined 1
  63.  
  64. typedef struct AttributeTupleFormD {
  65.     ObjectId    attrelid;
  66.     NameData    attname;
  67.     ObjectId    atttypid;
  68.     ObjectId    attdefrel;
  69.     uint32        attnvals;
  70.     ObjectId    atttyparg;    /* type arg for arrays/spquel/procs */
  71.     int16        attlen;
  72.     AttributeNumber    attnum;
  73.     uint16        attbound;
  74.     Boolean        attbyval;
  75.     Boolean        attcanindex;
  76.     OID        attproc;    /* spquel? */
  77. /*    char    *attlock; */
  78. } AttributeTupleFormD;
  79.  
  80. typedef AttributeTupleFormD    *AttributeTupleForm;
  81. #define AttributeTupleFormData    AttributeTupleFormD
  82.  
  83. #endif AttributeTupleForm_Defined
  84.  
  85. /* ----------------
  86.  *    InheritsTupleForm
  87.  * ----------------
  88.  */
  89. #ifndef InheritsTupleForm_Defined
  90. #define InheritsTupleForm_Defined 1
  91.  
  92. typedef struct InheritsTupleFormD {
  93.     ObjectId    inhrel;
  94.     ObjectId    inhparent;
  95.     int32        inhseqnum;    /* XXX uint32 better? */
  96. } InheritsTupleFormD;
  97.  
  98. typedef InheritsTupleFormD    *InheritsTupleForm;
  99.  
  100. #endif InheritsTupleForm_Defined
  101.  
  102. /* ----------------
  103.  *    IndexTupleForm
  104.  * ----------------
  105.  */
  106. #ifndef IndexTupleForm_Defined
  107. #define IndexTupleForm_Defined 1
  108.  
  109. typedef struct IndexTupleFormD {
  110.     ObjectId    indexrelid;
  111.     ObjectId    indrelid;
  112.     AttributeNumber    indkey[8];
  113.     ObjectId    indclass[8];
  114.     Boolean        indisclustered;
  115.     Boolean        indisarchived;
  116. /*    SPQUEL    inddesc; */
  117. } IndexTupleFormD;
  118.  
  119. typedef IndexTupleFormD        *IndexTupleForm;
  120. #define IndexTupleFormData    IndexTupleFormD
  121.  
  122. #endif IndexTupleForm_Defined
  123.  
  124. /* ----------------
  125.  *    VersionTupleForm
  126.  * ----------------
  127.  */
  128. #ifndef VersionTupleForm_Defined
  129. #define VersionTupleForm_Defined 1
  130.  
  131. typedef struct VersionTupleFormD {
  132.     ObjectId    verrelid;
  133.     ObjectId    verbaseid;
  134.     ABSTIME        vertime;
  135. } VersionTupleFormD;
  136.  
  137. typedef VersionTupleFormD    *VersionTupleForm;
  138.  
  139. #endif VersionTupleForm_Defined
  140.  
  141. /* ----------------
  142.  *    TypeTupleForm
  143.  * ----------------
  144.  */
  145. #ifndef TypeTupleForm_Defined
  146. #define TypeTupleForm_Defined 1
  147.  
  148. typedef struct    TypeTupleFormD {
  149.         /* VARIABLE LENGTH STRUCTURE */
  150.     NameData    typname;
  151.     ObjectId    typowner;
  152.     int16        typlen;
  153.     int16        typprtlen;
  154.     Boolean        typbyval;
  155.     char        typtype;
  156.     Boolean     typisdefined;
  157.     char        typdelim;
  158.     ObjectId    typrelid;
  159.     ObjectId    typelem;
  160.     RegProcedure    typinput;
  161.     RegProcedure    typoutput;
  162.     RegProcedure    typreceive;
  163.     RegProcedure    typsend;
  164.     struct    varlena    typdefault;
  165. } TypeTupleFormD;
  166.  
  167. typedef TypeTupleFormD        *TypeTupleForm;
  168. #define TypeTupleFormData    TypeTupleFormD
  169.  
  170. #endif TypeTupleForm_Defined
  171.  
  172. /* ----------------
  173.  *    OperatorTupleForm
  174.  * ----------------
  175.  */
  176. #ifndef OperatorTupleForm_Defined
  177. #define OperatorTupleForm_Defined 1
  178.  
  179. typedef struct OperatorTupleFormD {
  180.     NameData    oprname;
  181.     ObjectId    oprowner;
  182.     uint16        oprprec;
  183.     char        oprkind;
  184.     Boolean        oprisleft;
  185.     Boolean        oprcanhash;
  186.     ObjectId    oprleft;
  187.     ObjectId    oprright;
  188.     ObjectId    oprresult;
  189.     ObjectId    oprcom;
  190.     ObjectId    oprnegate;
  191.     ObjectId    oprlsortop;
  192.     ObjectId    oprrsortop;
  193.     RegProcedure    oprcode;
  194.     RegProcedure    oprrest;
  195.     RegProcedure    oprjoin;
  196. } OperatorTupleFormD;
  197.  
  198. typedef OperatorTupleFormD    *OperatorTupleForm;
  199.  
  200. #endif OperatorTupleForm_Defined
  201.  
  202. /* ----------------
  203.  *    AccessMethodTupleForm
  204.  * ----------------
  205.  */
  206. #ifndef AccessMethodTupleForm_Defined
  207. #define AccessMethodTupleForm_Defined 1
  208.  
  209. typedef struct AccessMethodTupleFormD {
  210.     NameData    amname;
  211.     ObjectId    amowner;
  212.     char        amkind;        /* XXX */
  213. /*    typedef uint16    StrategyNumber; */
  214.     uint16        amstrategies;
  215.     RegProcedure    amgettuple;
  216.     RegProcedure    aminsert;
  217.     RegProcedure    amdelete;
  218.     RegProcedure    amgetattr;
  219.     RegProcedure    amsetlock;
  220.     RegProcedure    amsettid;
  221.     RegProcedure    amfreetuple;
  222.     RegProcedure    ambeginscan;
  223.     RegProcedure    amrescan;
  224.     RegProcedure    amendscan;
  225.     RegProcedure    ammarkpos;
  226.     RegProcedure    amrestrpos;
  227.     RegProcedure    amopen;
  228.     RegProcedure    amclose;
  229.     RegProcedure    ambuild;
  230.     RegProcedure    amcreate;
  231.     RegProcedure    amdestroy;
  232. } AccessMethodTupleFormD;
  233.  
  234. typedef AccessMethodTupleFormD        *AccessMethodTupleForm;
  235.  
  236. #endif AccessMethodTupleForm_Defined
  237.  
  238. /* ----------------
  239.  *    AccessMethodOperatorTupleForm
  240.  * ----------------
  241.  */
  242. #ifndef AccessMethodOperatorTupleForm_Defined
  243. #define AccessMethodOperatorTupleForm_Defined 1
  244.  
  245. typedef struct AccessMethodOperatorTupleFormD {
  246.     ObjectId    amopamid;
  247.     ObjectId    amopclaid;
  248.     ObjectId    amopoprid;
  249.     StrategyNumber    amopstrategy;
  250.     RegProcedure    amopselect;
  251.     RegProcedure    amopnpages;
  252. } AccessMethodOperatorTupleFormD;
  253.  
  254. typedef AccessMethodOperatorTupleFormD    *AccessMethodOperatorTupleForm;
  255.  
  256. #endif AccessMethodOperatorTupleForm_Defined
  257.  
  258. /* ----------------------------------------------------------------
  259.  *    old catalog.h definitions
  260.  *
  261.  *    these are obsolete and will soon be going away.
  262.  * ----------------------------------------------------------------
  263.  */
  264.  
  265. /* ----------------
  266.  *    struct user
  267.  * ----------------
  268.  */
  269. #ifndef struct_user_Defined
  270. #define struct_user_Defined 1
  271.  
  272. struct    user {
  273.     char    usename[16];
  274.     int16    usesysid;    /* XXX uint16 better? */
  275.     Boolean    usecreatedb;
  276.     Boolean    usetrace;
  277.     Boolean    usesuper;
  278.     Boolean    usecatupd;
  279. };
  280.  
  281. #endif struct_user_Defined
  282.  
  283. /* ----------------
  284.  *    struct database
  285.  * ----------------
  286.  */
  287. #ifndef struct_database_Defined
  288. #define struct_database_Defined 1
  289.     
  290. struct    database {
  291.     char    datname[16];
  292.     OID    datdba;
  293.     struct    varlena    datpath;
  294. }; /* VARIABLE LENGTH STRUCTURE */
  295.  
  296. #endif struct_database_Defined
  297.  
  298. /* ----------------
  299.  *    struct defaults
  300.  * ----------------
  301.  */
  302. #ifndef struct_defaults_Defined
  303. #define struct_defaults_Defined 1
  304.  
  305. struct    defaults {
  306.     char    defname[16];
  307.     char    defvalue[16];
  308. };
  309.  
  310. #endif struct_defaults_Defined
  311.  
  312. /* ----------------
  313.  *    struct variables
  314.  * ----------------
  315.  */
  316. #ifndef struct_variables_Defined
  317. #define struct_variables_Defined 1
  318.  
  319. struct    variables {
  320.     char    varname[16];
  321.     struct    varlena    varvalue;
  322. }; /* VARIABLE LENGTH STRUCTURE */
  323.  
  324. #endif struct_variables_Defined
  325.  
  326. /* ----------------
  327.  *    struct magic
  328.  * ----------------
  329.  */
  330. #ifndef struct_magic_Defined
  331. #define struct_magic_Defined 1
  332.  
  333. struct    magic {
  334.     char    magname[16];
  335.     char    magvalue[16];
  336. };
  337. #endif struct_magic_Defined
  338.  
  339. /* ----------------
  340.  *    struct relation
  341.  * ----------------
  342.  */
  343. #ifndef struct_relation_Defined
  344. #define struct_relation_Defined 1
  345.  
  346. struct    relation {
  347.     char    relname[16];
  348.     OID    relowner;
  349.     OID    relam;
  350.     uint32    relpages;
  351.     uint32    reltuples;
  352.     ABSTIME    relexpires;
  353.     RELTIME    relpreserved;
  354.     Boolean    relhasindex;
  355.     Boolean    relisshared;
  356.     char    relkind;
  357.     char    relarch;
  358.     uint16    relnatts;
  359.     int16    relkey[8];
  360.     OID    relkeyop[8];
  361. /*    LOCK    rellock; */
  362. /*    SPQUEL    reldesc; */
  363. };
  364.  
  365. #endif struct_relation_Defined
  366.  
  367. /* ----------------
  368.  *    struct attribute
  369.  * ----------------
  370.  */
  371. #ifndef struct_attribute_Defined
  372. #define struct_attribute_Defined 1
  373.  
  374. struct    attribute {
  375.     OID    attrelid;
  376.     char    attname[16];
  377.     OID    atttypid;
  378.     OID    attdefrel;
  379.     uint32    attnvals;
  380.     OID    atttyparg;        /* type arg for arrays/spquel/procs */
  381.     int16    attlen;
  382.     int16    attnum;
  383.     uint16    attbound;
  384.     Boolean    attbyval;
  385.     Boolean    attcanindex;
  386.     OID    attproc;        /* spquel? */
  387. /*    char    *attlock; */
  388. };
  389.  
  390. #endif struct_attribute_Defined
  391.  
  392. /* ----------------
  393.  *    struct index
  394.  * ----------------
  395.  */
  396. #ifndef struct_index_Defined
  397. #define struct_index_Defined 1
  398.  
  399. struct    index {
  400.     OID    indexrelid;
  401.     OID    indrelid;
  402.     int16    indkey[8];
  403.     OID    indclass[8];
  404.     Boolean    indisclustered;
  405.     Boolean    indisarchived;
  406. /*    SPQUEL    inddesc; */
  407. };
  408. #endif struct_index_Defined
  409.  
  410. /* ----------------
  411.  *    struct version
  412.  * ----------------
  413.  */
  414. #ifndef struct_version_Defined
  415. #define struct_version_Defined 1
  416.  
  417. struct    version {
  418.     OID    verrelid;
  419.     OID    verbaseid;
  420.     ABSTIME    vertime;
  421. };
  422. #endif struct_version_Defined
  423.  
  424. /* ----------------
  425.  *    struct statistic
  426.  * ----------------
  427.  */
  428. #ifndef struct_statistic_Defined
  429. #define struct_statistic_Defined 1
  430.  
  431. struct    statistic {
  432.     OID    starelid;
  433.     uint16    staattnum;
  434.     OID    staop;
  435.     struct    varlena    stalokey;
  436. /*    struct    varlena    stahikey; */
  437. }; /* VARIABLE LENGTH STRUCTURE */
  438.  
  439. #endif struct_statistic_Defined
  440.  
  441. /* ----------------
  442.  *    struct type
  443.  * ----------------
  444.  */
  445. #ifndef struct_type_Defined
  446. #define struct_type_Defined 1
  447.  
  448. struct    type {
  449.     char    typname[16];
  450.     OID    typowner;
  451.     int16    typlen;
  452.     int16    typprtlen;
  453.     Boolean    typbyval;
  454.     char    typtype;
  455.     Boolean typisdefined;
  456.     OID    typrelid;
  457.     OID    typelem;
  458.     REGPROC    typinput;
  459.     REGPROC    typoutput;
  460.     REGPROC    typreceive;
  461.     REGPROC    typsend;
  462.     struct    varlena    typdefault;
  463. }; /* VARIABLE LENGTH STRUCTURE */
  464.  
  465. #endif struct_type_Defined
  466.  
  467. /* ----------------
  468.  *    struct operator
  469.  * ----------------
  470.  */
  471. #ifndef struct_operator_Defined
  472. #define struct_operator_Defined 1
  473.  
  474. struct    operator {
  475.     char    oprname[16];
  476.     OID    oprowner;
  477.     uint16    oprprec;
  478.     char    oprkind;
  479.     Boolean    oprisleft;
  480.     Boolean    oprcanhash;
  481.     OID    oprleft;
  482.     OID    oprright;
  483.     OID    oprresult;
  484.     OID    oprcom;
  485.     OID    oprnegate;
  486.     OID    oprlsortop;
  487.     OID    oprrsortop;
  488.     REGPROC    oprcode;
  489.     REGPROC    oprrest;
  490.     REGPROC    oprjoin;
  491. };
  492.  
  493. #endif struct_operator_Defined
  494.  
  495. /* ----------------
  496.  *    struct opclass
  497.  * ----------------
  498.  */
  499. #ifndef struct_opclass_Defined
  500. #define struct_opclass_Defined 1
  501.  
  502. struct    opclass {
  503.     char    opcname[16];
  504. };
  505. #endif struct_opclass_Defined
  506.  
  507. /* ----------------
  508.  *    struct am
  509.  * ----------------
  510.  */
  511. #ifndef struct_am_Defined
  512. #define struct_am_Defined 1
  513.  
  514. struct    am {
  515.     char    amname[16];
  516.     OID    amowner;
  517.     char    amkind;
  518.     uint16  amstrategies;
  519.     REGPROC    amgettuple;
  520.     REGPROC    aminsert;
  521.     REGPROC    amdelete;
  522.     REGPROC    amgetattr;
  523.     REGPROC    amsetlock;
  524.     REGPROC    amsettid;
  525.     REGPROC    amfreetuple;
  526.     REGPROC    ambeginscan;
  527.     REGPROC    amrescan;
  528.     REGPROC    amendscan;
  529.     REGPROC    ammarkpos;
  530.     REGPROC    amrestrpos;
  531.     REGPROC    amopen;
  532.     REGPROC    amclose;
  533.     REGPROC    ambuild;
  534.     REGPROC    amcreate;
  535.     REGPROC    amdestroy;
  536. };
  537.  
  538. #endif struct_am_Defined
  539.  
  540. /* ----------------
  541.  *    struct amop
  542.  * ----------------
  543.  */
  544. #ifndef struct_amop_Defined
  545. #define struct_amop_Defined 1
  546.  
  547. struct    amop {
  548.     OID    amopamid;
  549.     OID    amopclaid;
  550.     OID    amopoprid;
  551.     uint16    amopstrategy;
  552.     REGPROC    amopselect;
  553.     REGPROC    amopnpages;
  554. };
  555.  
  556. #endif struct_amop_Defined
  557.  
  558. /* ----------------
  559.  *    struct rule
  560.  * ----------------
  561.  */
  562. #ifndef struct_rule_Defined
  563. #define struct_rule_Defined 1
  564.  
  565. struct    rule {
  566.     char    rulname[16];
  567.     OID    rulowner;
  568.     OID    rulserver;
  569.     char    rulportal[16];
  570.     uint16    rulpriority;
  571.     char    rulstatus;
  572.     char    rulkind;
  573.     REGPROC    rulstat1;
  574.     REGPROC    rulstat2;
  575. };
  576. #endif struct_rule_Defined
  577.  
  578. /* ----------------
  579.  *    struct ruleplans
  580.  * ----------------
  581.  */
  582. #ifndef struct_ruleplans_Defined
  583. #define struct_ruleplans_Defined 1
  584.  
  585. struct    ruleplans {
  586.     OID    rplrulid;
  587.     uint16    rplnum;
  588.     struct    varlena    rplcode;    /* postquel */
  589. }; /* VARIABLE LENGTH STRUCTURE */
  590.  
  591. #endif struct_ruleplans_Defined
  592.  
  593. /* ----------------
  594.  *    struct proc
  595.  * ----------------
  596.  */
  597. #ifndef struct_proc_Defined
  598. #define struct_proc_Defined 1
  599.  
  600. struct    proc {
  601.     char    proname[16];
  602.     OID    proowner;
  603.     OID    prolang;
  604.     Boolean    proisinh;
  605.     Boolean    proistrusted;
  606.     Boolean    proiscachable;
  607.     uint16    pronargs;
  608.     OID    prorettype;
  609. }; /* VARIABLE LENGTH STRUCTURE */
  610.  
  611. #endif struct_proc_Defined
  612.  
  613. /* ----------------
  614.  *    struct language
  615.  * ----------------
  616.  */
  617. #ifndef struct_language_Defined
  618. #define struct_language_Defined 1
  619.  
  620. struct    language {
  621.     char    lanname[16];
  622.     struct    varlena    lancompiler;
  623. }; /* VARIABLE LENGTH STRUCTURE */
  624.  
  625. #endif struct_language_Defined
  626.  
  627. /* ----------------
  628.  *    struct parg
  629.  * ----------------
  630.  */
  631. #ifndef struct_parg_Defined
  632. #define struct_parg_Defined 1
  633.  
  634. struct    parg {
  635.     OID    parproid;
  636.     uint16    parnum;
  637.     uint8    parbound;
  638.     OID    partype;
  639. };
  640. #endif struct_parg_Defined
  641.  
  642. /* ----------------
  643.  *    struct aggregate
  644.  * ----------------
  645.  */
  646. #ifndef struct_aggregate_Defined
  647. #define struct_aggregate_Defined 1
  648.  
  649. struct    aggregate {
  650.     char    aggname[16];
  651.     OID    aggowner;
  652.     OID    aggfun1;
  653.     OID    aggfun2;
  654. };
  655. #endif struct_aggregate_Defined
  656.  
  657. /* ----------------
  658.  *    struct ipl
  659.  * ----------------
  660.  */
  661. #ifndef struct_ipl_Defined
  662. #define struct_ipl_Defined 1
  663.  
  664. struct    ipl {
  665.     OID    ipdrel;
  666.     OID    ipdinherits;
  667.     int32    ipdseqnum;    /* XXX uint16 better? */
  668. };
  669. #endif struct_ipl_Defined
  670.  
  671. /* ----------------
  672.  *    struct inheritproc
  673.  * ----------------
  674.  */
  675. #ifndef struct_inheritproc_Defined
  676. #define struct_inheritproc_Defined 1
  677.  
  678. struct    inheritproc {
  679.     char    inhprocname[16];
  680.     OID    inhargrel;
  681.     OID    inhdefrel;
  682.     OID    inhproc;
  683. };
  684. #endif struct_inheritproc_Defined
  685.  
  686. /* ----------------
  687.  *    struct demon
  688.  * ----------------
  689.  */
  690. #ifndef struct_demon_Defined
  691. #define struct_demon_Defined 1
  692.  
  693. struct    demon {
  694.     OID    demserid;
  695.     char    demname[16];
  696.     OID    demowner;
  697.     REGPROC    demcode;
  698. };
  699.  
  700. #endif struct_demon_Defined
  701.  
  702. /* ----------------
  703.  *    struct_server
  704.  * ----------------
  705.  */
  706. #ifndef struct_server_Defined
  707. #define struct_server_Defined 1
  708.  
  709. struct    server {    
  710.     char    sername[16];
  711.     int16    serpid;        /* XXX uint16 better? */
  712.     int16    serport;    /* XXX uint16 better? */
  713. };
  714. #endif struct_server_Defined
  715.  
  716. /* ----------------
  717.  *    struct prs2plans
  718.  * ----------------
  719.  */
  720. #ifndef struct_prs2plans_Defined
  721. #define struct_prs2plans_Defined 1
  722.  
  723. struct    prs2plans {
  724.     OID    prs2ruleid;
  725.     uint16    prs2planno;
  726.     struct    varlena prs2code;
  727. }; /* VARIABLE LENGTH STRUCTURE */
  728.  
  729. #endif struct_prs2plans_Defined
  730.  
  731. /* ----------------
  732.  *    struct prs2rule
  733.  * ----------------
  734.  */
  735. #ifndef struct_prs2rule_Defined
  736. #define struct_prs2rule_Defined 1
  737.  
  738. struct    prs2rule {
  739.     char    prs2name[16];
  740.     uint8    prs2eventtype;
  741.     OID    prs2eventrel;
  742.     uint16    prs2eventattr;
  743.     float64 prs2necessary;
  744.     float64 prs2sufficient;
  745.     struct    varlena prs2text;
  746. }; /* VARIABLE LENGTH STRUCTURE */
  747.  
  748. #endif struct_prs2rule_Defined
  749.  
  750. #endif    /* !defined(CatIncluded) */
  751.