|
1 | 1 | <!--
|
2 | 2 | Documentation of the system catalogs, directed toward PostgreSQL developers
|
3 |
| - $Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.19 2001/07/15 22:48:15 tgl Exp $ |
| 3 | + $Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.20 2001/08/10 18:57:32 tgl Exp $ |
4 | 4 | -->
|
5 | 5 |
|
6 | 6 | <chapter id="catalogs">
|
|
532 | 532 | <para>
|
533 | 533 | <structname>pg_class</structname> catalogues tables and mostly
|
534 | 534 | everything else that has columns or is otherwise similar to a
|
535 |
| - table. This includes indexes (but see |
| 535 | + table. This includes indexes (but see also |
536 | 536 | <structname>pg_index</structname>), sequences, views, and some
|
537 |
| - kinds of special relation kinds. Below, when we mean all of these |
| 537 | + kinds of special relation. Below, when we mean all of these |
538 | 538 | kinds of objects we speak of <quote>relations</quote>. Not all
|
539 | 539 | fields are meaningful for all relation types.
|
540 | 540 | </para>
|
|
565 | 565 | <entry><type>oid</type></entry>
|
566 | 566 | <entry>pg_type.oid</entry>
|
567 | 567 | <entry>
|
568 |
| - The data type that corresponds to this table (not functional, |
569 |
| - only set for system tables) |
| 568 | + The OID of the data type that corresponds to this table, if any |
| 569 | + (zero for indexes, which have no pg_type entry) |
570 | 570 | </entry>
|
571 | 571 | </row>
|
572 | 572 |
|
|
631 | 631 | <entry>reltoastidxid</entry>
|
632 | 632 | <entry><type>oid</type></entry>
|
633 | 633 | <entry>pg_class.oid</entry>
|
634 |
| - <entry>Oid of the index on the TOAST table for this table, 0 if none</entry> |
| 634 | + <entry> |
| 635 | + For a TOAST table, the OID of its index. 0 if not a TOAST table. |
| 636 | + </entry> |
635 | 637 | </row>
|
636 | 638 |
|
637 | 639 | <row>
|
638 | 640 | <entry>relhasindex</entry>
|
639 | 641 | <entry><type>bool</type></entry>
|
640 | 642 | <entry></entry>
|
641 |
| - <entry>True if this is a table and it has at least one index</entry> |
| 643 | + <entry>True if this is a table and it has (or recently had) any indexes. |
| 644 | + This is set by CREATE INDEX, but not cleared immediately by DROP INDEX. |
| 645 | + VACUUM clears relhasindex if it finds the table has no indexes. |
| 646 | + </entry> |
642 | 647 | </row>
|
643 | 648 |
|
644 | 649 | <row>
|
|
664 | 669 | <entry><type>int2</type></entry>
|
665 | 670 | <entry></entry>
|
666 | 671 | <entry>
|
667 |
| - Number of columns in the relation, besides system columns. |
| 672 | + Number of user columns in the relation (system columns not counted). |
668 | 673 | There must be this many corresponding entries in
|
669 | 674 | <structname>pg_attribute</structname>. See also
|
670 | 675 | <structname>pg_attribute</structname>.<structfield>attnum</structfield>.
|
|
695 | 700 | <entry>relukeys</entry>
|
696 | 701 | <entry><type>int2</type></entry>
|
697 | 702 | <entry></entry>
|
698 |
| - <entry>unused (<emphasis>Not</emphasis> the number of unique keys or something.)</entry> |
| 703 | + <entry>unused (<emphasis>Not</emphasis> the number of unique keys)</entry> |
699 | 704 | </row>
|
700 | 705 |
|
701 | 706 | <row>
|
702 | 707 | <entry>relfkeys</entry>
|
703 | 708 | <entry><type>int2</type></entry>
|
704 | 709 | <entry></entry>
|
705 |
| - <entry>Number foreign keys on the table</entry> |
| 710 | + <entry>unused (<emphasis>Not</emphasis> the number of foreign keys on the table)</entry> |
| 711 | + </row> |
| 712 | + |
| 713 | + <row> |
| 714 | + <entry>relrefs</entry> |
| 715 | + <entry><type>int2</type></entry> |
| 716 | + <entry></entry> |
| 717 | + <entry>unused</entry> |
| 718 | + </row> |
| 719 | + |
| 720 | + <row> |
| 721 | + <entry>relhasoids</entry> |
| 722 | + <entry><type>bool</type></entry> |
| 723 | + <entry></entry> |
| 724 | + <entry> |
| 725 | + True if we generate an OID for each row of the relation. |
| 726 | + </entry> |
706 | 727 | </row>
|
707 | 728 |
|
708 | 729 | <row>
|
709 | 730 | <entry>relhaspkey</entry>
|
710 | 731 | <entry><type>bool</type></entry>
|
711 | 732 | <entry></entry>
|
712 | 733 | <entry>
|
713 |
| - unused (No, this does not say whether the table has a primary |
714 |
| - key. It's really unused.) |
| 734 | + True if the table has (or once had) a primary key. |
715 | 735 | </entry>
|
716 | 736 | </row>
|
717 | 737 |
|
|
726 | 746 | <entry>relhassubclass</entry>
|
727 | 747 | <entry><type>bool</type></entry>
|
728 | 748 | <entry></entry>
|
729 |
| - <entry>At least one table inherits this one</entry> |
| 749 | + <entry>At least one table inherits from this one</entry> |
730 | 750 | </row>
|
731 | 751 |
|
732 | 752 | <row>
|
|
874 | 894 | <entry>The oid of the object this description pertains to</entry>
|
875 | 895 | </row>
|
876 | 896 |
|
| 897 | + <row> |
| 898 | + <entry>classoid</entry> |
| 899 | + <entry><type>oid</type></entry> |
| 900 | + <entry>pg_class.oid</entry> |
| 901 | + <entry>The oid of the system catalog this object appears in</entry> |
| 902 | + </row> |
| 903 | + |
| 904 | + <row> |
| 905 | + <entry>objsubid</entry> |
| 906 | + <entry><type>int4</type></entry> |
| 907 | + <entry></entry> |
| 908 | + <entry>For a comment on a table attribute, this is the attribute's |
| 909 | + column number (the objoid and classoid refer to the table itself). |
| 910 | + For all other object types, this field is presently zero. |
| 911 | + </entry> |
| 912 | + </row> |
| 913 | + |
877 | 914 | <row>
|
878 | 915 | <entry>description</entry>
|
879 | 916 | <entry><type>text</type></entry>
|
|
0 commit comments