2 Documentation of the system catalogs, directed toward PostgreSQL developers
3 $Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.64 2002/12/17 17:41:30 momjian Exp $
6 <chapter id="catalogs">
7 <title>System Catalogs</title>
9 <sect1 id="catalogs-overview">
10 <title>Overview</title>
13 The system catalogs are the place where a relational database
14 management system stores schema metadata, such as information about
15 tables and columns, and internal bookkeeping information.
16 <productname>PostgreSQL</productname>'s system catalogs are regular
17 tables. You can drop and recreate the tables, add columns, insert
18 and update values, and severely mess up your system that way.
19 Normally one should not change the system catalogs by hand, there
20 are always SQL commands to do that. (For example, <command>CREATE
21 DATABASE</command> inserts a row into the
22 <structname>pg_database</structname> catalog -- and actually
23 creates the database on disk.) There are some exceptions for
24 especially esoteric operations, such as adding index access methods.
27 Most system catalogs are copied from the template database during
28 database creation, and are thereafter database-specific. A few
29 catalogs are physically shared across all databases in an installation;
30 these are marked in the descriptions of the individual catalogs.
34 <title>System Catalogs</title>
39 <entry>Catalog Name</entry>
40 <entry>Purpose</entry>
46 <entry><link linkend="catalog-pg-aggregate">
47 <database class="table">pg_aggregate</database></link></entry>
48 <entry>aggregate functions</entry>
53 <entry>index access methods</entry>
57 <entry>pg_amop</entry>
58 <entry>access method operators</entry>
62 <entry>pg_amproc</entry>
63 <entry>access method support procedures</entry>
67 <entry><link linkend="catalog-pg-attrdef">
68 <database class="table">pg_attrdef</database></link></entry>
69 <entry>column default values</entry>
73 <entry><link linkend="catalog-pg-attribute">
74 <database class="table">pg_attribute</database></link></entry>
75 <entry>table columns (<quote>attributes</quote>, <quote>fields</quote>)</entry>
79 <entry><link linkend="catalog-pg-cast">
80 <database class="table">pg_cast</database></link></entry>
81 <entry>casts (data type conversions)</entry>
85 <entry><link linkend="catalog-pg-class">
86 <database class="table">pg_class</database></link></entry>
87 <entry>tables, indexes, sequences (<quote>relations</quote>)</entry>
91 <entry><link linkend="catalog-pg-constraint">
92 <database class="table">pg_constraint</database></link></entry>
93 <entry>check constraints, unique / primary key constraints, foreign key constraints</entry>
97 <entry><link linkend="catalog-pg-conversion">
98 <database class="table">pg_conversion</database></link></entry>
99 <entry>encoding conversion information</entry>
103 <entry><link linkend="catalog-pg-database">
104 <database class="table">pg_database</database></link></entry>
105 <entry>databases within this database cluster</entry>
109 <entry><link linkend="catalog-pg-depend">
110 <database class="table">pg_depend</database></link></entry>
111 <entry>dependencies between database objects</entry>
115 <entry><link linkend="catalog-pg-description">
116 <database class="table">pg_description</database></link></entry>
117 <entry>descriptions or comments on database objects</entry>
121 <entry><link linkend="catalog-pg-group">
122 <database class="table">pg_group</database></link></entry>
123 <entry>groups of database users</entry>
127 <entry><link linkend="catalog-pg-index">
128 <database class="table">pg_index</database></link></entry>
129 <entry>additional index information</entry>
133 <entry><link linkend="catalog-pg-inherits">
134 <database class="table">pg_inherits</database></link></entry>
135 <entry>table inheritance hierarchy</entry>
139 <entry><link linkend="catalog-pg-language">
140 <database class="table">pg_language</database></link></entry>
141 <entry>languages for writing functions</entry>
145 <entry><link linkend="catalog-pg-largeobject">
146 <database class="table">pg_largeobject</database></link></entry>
147 <entry>large objects</entry>
151 <entry><link linkend="catalog-pg-listener">
152 <database class="table">pg_listener</database></link></entry>
153 <entry>asynchronous notification</entry>
157 <entry><link linkend="catalog-pg-namespace">
158 <database class="table">pg_namespace</database></link></entry>
159 <entry>namespaces (schemas)</entry>
163 <entry><link linkend="catalog-pg-opclass">
164 <database class="table">pg_opclass</database></link></entry>
165 <entry>index access method operator classes</entry>
169 <entry><link linkend="catalog-pg-operator">
170 <database class="table">pg_operator</database></link></entry>
171 <entry>operators</entry>
175 <entry><link linkend="catalog-pg-proc">
176 <database class="table">pg_proc</database></link></entry>
177 <entry>functions and procedures</entry>
181 <entry><link linkend="catalog-pg-rewrite">
182 <database class="table">pg_rewrite</database></link></entry>
183 <entry>query rewriter rules</entry>
187 <entry><link linkend="catalog-pg-shadow">
188 <database class="table">pg_shadow</database></link></entry>
189 <entry>database users</entry>
193 <entry><link linkend="catalog-pg-statistic">
194 <database class="table">pg_statistic</database></link></entry>
195 <entry>optimizer statistics</entry>
199 <entry><link linkend="catalog-pg-trigger">
200 <database class="table">pg_trigger</database></link></entry>
201 <entry>triggers</entry>
205 <entry><link linkend="catalog-pg-type">
206 <database class="table">pg_type</database></link></entry>
207 <entry>data types</entry>
214 More detailed documentation of each catalog follows below.
220 <sect1 id="catalog-pg-aggregate">
221 <title>pg_aggregate</title>
224 <structname>pg_aggregate</structname> stores information about
225 aggregate functions. An aggregate function is a function that
226 operates on a set of values (typically one column from each row
227 that matches a query condition) and returns a single value computed
228 from all these values. Typical aggregate functions are
229 <function>sum</function>, <function>count</function>, and
230 <function>max</function>. Each entry in
231 <structname>pg_aggregate</structname> is an extension of an entry
232 in <structname>pg_proc</structname>. The <structname>pg_proc</structname>
233 entry carries the aggregate's name, input and output datatypes, and
234 other information that is similar to ordinary functions.
238 <title>pg_aggregate Columns</title>
245 <entry>References</entry>
246 <entry>Description</entry>
251 <entry>aggfnoid</entry>
252 <entry><type>regproc</type></entry>
253 <entry>pg_proc.oid</entry>
254 <entry>pg_proc OID of the aggregate function</entry>
257 <entry>aggtransfn</entry>
258 <entry><type>regproc</type></entry>
259 <entry>pg_proc.oid</entry>
260 <entry>Transition function</entry>
263 <entry>aggfinalfn</entry>
264 <entry><type>regproc</type></entry>
265 <entry>pg_proc.oid</entry>
266 <entry>Final function (zero if none)</entry>
269 <entry>aggtranstype</entry>
270 <entry><type>oid</type></entry>
271 <entry>pg_type.oid</entry>
272 <entry>The type of the aggregate function's internal transition (state) data</entry>
275 <entry>agginitval</entry>
276 <entry><type>text</type></entry>
279 The initial value of the transition state. This is a text
280 field containing the initial value in its external string
281 representation. If the field is NULL, the transition state
282 value starts out NULL.
290 New aggregate functions are registered with the <command>CREATE
291 AGGREGATE</command> command. See the <citetitle>Programmer's
292 Guide</citetitle> for more information about writing aggregate
293 functions and the meaning of the transition functions, etc.
299 <sect1 id="catalog-pg-am">
303 <structname>pg_am</structname> stores information about index access
304 methods. There is one row for each index access method supported by
309 <title>pg_am Columns</title>
316 <entry>References</entry>
317 <entry>Description</entry>
323 <entry>amname</entry>
324 <entry><type>name</type></entry>
326 <entry>name of the access method</entry>
330 <entry>amowner</entry>
331 <entry><type>int4</type></entry>
332 <entry>pg_shadow.usesysid</entry>
333 <entry>user ID of the owner (currently not used)</entry>
337 <entry>amstrategies</entry>
338 <entry><type>int2</type></entry>
340 <entry>number of operator strategies for this access method</entry>
344 <entry>amsupport</entry>
345 <entry><type>int2</type></entry>
347 <entry>number of support routines for this access method</entry>
351 <entry>amorderstrategy</entry>
352 <entry><type>int2</type></entry>
354 <entry>zero if the index offers no sort order, otherwise the strategy
355 number of the strategy operator that describes the sort order</entry>
359 <entry>amcanunique</entry>
360 <entry><type>bool</type></entry>
362 <entry>does AM support unique indexes?</entry>
366 <entry>amcanmulticol</entry>
367 <entry><type>bool</type></entry>
369 <entry>does AM support multicolumn indexes?</entry>
373 <entry>amindexnulls</entry>
374 <entry><type>bool</type></entry>
376 <entry>does AM support NULL index entries?</entry>
380 <entry>amconcurrent</entry>
381 <entry><type>bool</type></entry>
383 <entry>does AM support concurrent updates?</entry>
387 <entry>amgettuple</entry>
388 <entry><type>regproc</type></entry>
389 <entry>pg_proc.oid</entry>
390 <entry><quote>next valid tuple</quote> function</entry>
394 <entry>aminsert</entry>
395 <entry><type>regproc</type></entry>
396 <entry>pg_proc.oid</entry>
397 <entry><quote>insert this tuple</quote> function</entry>
401 <entry>ambeginscan</entry>
402 <entry><type>regproc</type></entry>
403 <entry>pg_proc.oid</entry>
404 <entry><quote>start new scan</quote> function</entry>
408 <entry>amrescan</entry>
409 <entry><type>regproc</type></entry>
410 <entry>pg_proc.oid</entry>
411 <entry><quote>restart this scan</quote> function</entry>
415 <entry>amendscan</entry>
416 <entry><type>regproc</type></entry>
417 <entry>pg_proc.oid</entry>
418 <entry><quote>end this scan</quote> function</entry>
422 <entry>ammarkpos</entry>
423 <entry><type>regproc</type></entry>
424 <entry>pg_proc.oid</entry>
425 <entry><quote>mark current scan position</quote> function</entry>
429 <entry>amrestrpos</entry>
430 <entry><type>regproc</type></entry>
431 <entry>pg_proc.oid</entry>
432 <entry><quote>restore marked scan position</quote> function</entry>
436 <entry>ambuild</entry>
437 <entry><type>regproc</type></entry>
438 <entry>pg_proc.oid</entry>
439 <entry><quote>build new index</quote> function</entry>
443 <entry>ambulkdelete</entry>
444 <entry><type>regproc</type></entry>
445 <entry>pg_proc.oid</entry>
446 <entry>bulk-delete function</entry>
450 <entry>amcostestimate</entry>
451 <entry><type>regproc</type></entry>
452 <entry>pg_proc.oid</entry>
453 <entry>estimate cost of an indexscan</entry>
461 An index AM that supports multiple columns (has
462 <structfield>amcanmulticol</structfield> true) <emphasis>must</>
463 support indexing nulls in columns after the first, because the planner
464 will assume the index can be used for queries on just the first
465 column(s). For example, consider an index on (a,b) and a query
466 WHERE a = 4. The system will assume the index can be used to scan for
467 rows with a = 4, which is wrong if the index omits rows where b is null.
468 However it is okay to omit rows where the first indexed column is null.
469 (GiST currently does so.)
470 <structfield>amindexnulls</structfield> should be set true only if the
471 index AM indexes all rows, including arbitrary combinations of nulls.
477 <sect1 id="catalog-pg-amop">
478 <title>pg_amop</title>
481 <structname>pg_amop</structname> stores information about operators
482 associated with index access method operator classes. There is one
483 row for each operator that is a member of an operator class.
487 <title>pg_amop Columns</title>
494 <entry>References</entry>
495 <entry>Description</entry>
501 <entry>amopclaid</entry>
502 <entry><type>oid</type></entry>
503 <entry>pg_opclass.oid</entry>
504 <entry>the index opclass this entry is for</entry>
508 <entry>amopstrategy</entry>
509 <entry><type>int2</type></entry>
511 <entry>operator strategy number</entry>
515 <entry>amopreqcheck</entry>
516 <entry><type>bool</type></entry>
518 <entry>index hit must be rechecked</entry>
522 <entry>amopopr</entry>
523 <entry><type>oid</type></entry>
524 <entry>pg_operator.oid</entry>
525 <entry>the operator's pg_operator OID</entry>
535 <sect1 id="catalog-pg-amproc">
536 <title>pg_amproc</title>
539 <structname>pg_amproc</structname> stores information about support
541 associated with index access method operator classes. There is one
542 row for each support procedure belonging to an operator class.
546 <title>pg_amproc Columns</title>
553 <entry>References</entry>
554 <entry>Description</entry>
560 <entry>amopclaid</entry>
561 <entry><type>oid</type></entry>
562 <entry>pg_opclass.oid</entry>
563 <entry>the index opclass this entry is for</entry>
567 <entry>amprocnum</entry>
568 <entry><type>int2</type></entry>
570 <entry>support procedure index</entry>
574 <entry>amproc</entry>
575 <entry><type>regproc</type></entry>
576 <entry>pg_proc.oid</entry>
577 <entry>OID of the proc</entry>
587 <sect1 id="catalog-pg-attrdef">
588 <title>pg_attrdef</title>
591 This catalog stores column default values. The main information
592 about columns is stored in <structname>pg_attribute</structname>
593 (see below). Only columns that explicitly specify a default value
594 (when the table is created or the column is added) will have an
599 <title>pg_attrdef Columns</title>
606 <entry>References</entry>
607 <entry>Description</entry>
613 <entry>adrelid</entry>
614 <entry><type>oid</type></entry>
615 <entry>pg_class.oid</entry>
616 <entry>The table this column belongs to</entry>
621 <entry><type>int2</type></entry>
622 <entry>pg_attribute.attnum</entry>
623 <entry>The number of the column</entry>
628 <entry><type>text</type></entry>
630 <entry>An internal representation of the column default value</entry>
635 <entry><type>text</type></entry>
637 <entry>A human-readable representation of the default value</entry>
646 <sect1 id="catalog-pg-attribute">
647 <title>pg_attribute</title>
650 <structname>pg_attribute</structname> stores information about
651 table columns. There will be exactly one
652 <structname>pg_attribute</structname> row for every column in every
653 table in the database. (There will also be attribute entries for
654 indexes and other objects. See <structname>pg_class</structname>.)
658 The term attribute is equivalent to column and is used for
663 <title>pg_attribute Columns</title>
670 <entry>References</entry>
671 <entry>Description</entry>
677 <entry>attrelid</entry>
678 <entry><type>oid</type></entry>
679 <entry>pg_class.oid</entry>
680 <entry>The table this column belongs to</entry>
684 <entry>attname</entry>
685 <entry><type>name</type></entry>
687 <entry>Column name</entry>
691 <entry>atttypid</entry>
692 <entry><type>oid</type></entry>
693 <entry>pg_type.oid</entry>
694 <entry>The data type of this column</entry>
698 <entry>attstattarget</entry>
699 <entry><type>int4</type></entry>
702 <structfield>attstattarget</structfield> controls the level of detail
703 of statistics accumulated for this column by
704 <command>ANALYZE</command>.
705 A zero value indicates that no statistics should be collected.
706 A negative value says to use the system default statistics target.
707 The exact meaning of positive values is datatype-dependent.
708 For scalar datatypes, <structfield>attstattarget</structfield>
709 is both the target number of <quote>most common values</quote>
710 to collect, and the target number of histogram bins to create.
715 <entry>attlen</entry>
716 <entry><type>int2</type></entry>
720 <structname>pg_type</structname>.<structfield>typlen</structfield>
721 of this column's type.
726 <entry>attnum</entry>
727 <entry><type>int2</type></entry>
730 The number of the column. Ordinary columns are numbered from 1
731 up. System columns, such as <structfield>oid</structfield>,
732 have (arbitrary) negative numbers.
737 <entry>attndims</entry>
738 <entry><type>int4</type></entry>
741 Number of dimensions, if the column is an array type; otherwise 0.
742 (Presently, the number of dimensions of an array is not enforced,
743 so any nonzero value effectively means <quote>it's an array</>.)
748 <entry>attcacheoff</entry>
749 <entry><type>int4</type></entry>
752 Always -1 in storage, but when loaded into a tuple descriptor
753 in memory this may be updated to cache the offset of the attribute
759 <entry>atttypmod</entry>
760 <entry><type>int4</type></entry>
763 <structfield>atttypmod</structfield> records type-specific data
764 supplied at table creation time (for example, the maximum
765 length of a <type>varchar</type> column). It is passed to
766 type-specific input functions and length coercion functions.
767 The value will generally be -1 for types that do not need typmod.
772 <entry>attbyval</entry>
773 <entry><type>bool</type></entry>
777 <structname>pg_type</structname>.<structfield>typbyval</structfield>
778 of this column's type
783 <entry>attstorage</entry>
784 <entry><type>char</type></entry>
788 <structname>pg_type</structname>.<structfield>typstorage</structfield>
789 of this column's type. For TOASTable datatypes, this can be altered
790 after column creation to control storage policy.
795 <entry>attisset</entry>
796 <entry><type>bool</type></entry>
799 If true, this attribute is a set. In that case, what is really
800 stored in the attribute is the OID of a tuple in the
801 <structname>pg_proc</structname> catalog. The
802 <structname>pg_proc</structname> tuple contains the query
803 string that defines this set - i.e., the query to run to get
804 the set. So the <structfield>atttypid</structfield> (see
805 above) refers to the type returned by this query, but the
806 actual length of this attribute is the length (size) of an
807 <type>oid</type>. --- At least this is the theory. All this
808 is probably quite broken these days.
813 <entry>attalign</entry>
814 <entry><type>char</type></entry>
818 <structname>pg_type</structname>.<structfield>typalign</structfield>
819 of this column's type
824 <entry>attnotnull</entry>
825 <entry><type>bool</type></entry>
828 This represents a NOT NULL constraint. It is possible to
829 change this field to enable or disable the constraint.
834 <entry>atthasdef</entry>
835 <entry><type>bool</type></entry>
838 This column has a default value, in which case there will be a
839 corresponding entry in the <structname>pg_attrdef</structname>
840 catalog that actually defines the value.
845 <entry>attisdropped</entry>
846 <entry><type>bool</type></entry>
849 This column has been dropped and is no longer valid. A dropped
850 column is still physically present in the table, but is
851 ignored by the parser and so cannot be accessed via SQL.
856 <entry>attislocal</entry>
857 <entry><type>bool</type></entry>
860 This column is defined locally in the relation. Note that a column may
861 be locally defined and inherited simultaneously.
866 <entry>attinhcount</entry>
867 <entry><type>int4</type></entry>
870 The number of direct ancestors this column has. A column with a
871 nonzero number of ancestors cannot be dropped nor renamed.
881 <sect1 id="catalog-pg-cast">
882 <title>pg_cast</title>
885 <structname>pg_cast</structname> stores data type conversion paths,
886 both built-in paths and those defined with <command>CREATE CAST</command>.
890 <title>pg_cast Columns</title>
897 <entry>References</entry>
898 <entry>Description</entry>
904 <entry>castsource</entry>
905 <entry><type>oid</type></entry>
906 <entry>pg_type.oid</entry>
907 <entry>OID of the source data type</entry>
911 <entry>casttarget</entry>
912 <entry><type>oid</type></entry>
913 <entry>pg_type.oid</entry>
914 <entry>OID of the target data type</entry>
918 <entry>castfunc</entry>
919 <entry><type>oid</type></entry>
920 <entry>pg_proc.oid</entry>
922 The OID of the function to use to perform this cast. Zero is
923 stored if the data types are binary coercible (that is, no
924 run-time operation is needed to perform the cast).
929 <entry>castcontext</entry>
930 <entry><type>char</type></entry>
933 Indicates what contexts the cast may be invoked in.
934 <literal>e</> means only as an explicit cast (using
935 <literal>CAST</>, <literal>::</>, or function-call syntax).
936 <literal>a</> means implicitly in assignment
937 to a target column, as well as explicitly.
938 <literal>i</> means implicitly in expressions, as well as the
947 <sect1 id="catalog-pg-class">
948 <title>pg_class</title>
951 <structname>pg_class</structname> catalogs tables and most
952 everything else that has columns or is otherwise similar to a
953 table. This includes indexes (but see also
954 <structname>pg_index</structname>), sequences, views, and some
955 kinds of special relation; see <structfield>relkind</>.
956 Below, when we mean all of these
957 kinds of objects we speak of <quote>relations</quote>. Not all
958 fields are meaningful for all relation types.
962 <title>pg_class Columns</title>
969 <entry>References</entry>
970 <entry>Description</entry>
976 <entry>relname</entry>
977 <entry><type>name</type></entry>
979 <entry>Name of the table, index, view, etc.</entry>
983 <entry>relnamespace</entry>
984 <entry><type>oid</type></entry>
985 <entry>pg_namespace.oid</entry>
987 The OID of the namespace that contains this relation
992 <entry>reltype</entry>
993 <entry><type>oid</type></entry>
994 <entry>pg_type.oid</entry>
996 The OID of the data type that corresponds to this table, if any
997 (zero for indexes, which have no pg_type entry)
1002 <entry>relowner</entry>
1003 <entry><type>int4</type></entry>
1004 <entry>pg_shadow.usesysid</entry>
1005 <entry>Owner of the relation</entry>
1009 <entry>relam</entry>
1010 <entry><type>oid</type></entry>
1011 <entry>pg_am.oid</entry>
1012 <entry>If this is an index, the access method used (B-tree, hash, etc.)</entry>
1016 <entry>relfilenode</entry>
1017 <entry><type>oid</type></entry>
1019 <entry>Name of the on-disk file of this relation; 0 if none</entry>
1023 <entry>relpages</entry>
1024 <entry><type>int4</type></entry>
1027 Size of the on-disk representation of this table in pages (size
1028 <symbol>BLCKSZ</symbol>).
1029 This is only an estimate used by the planner.
1030 It is updated by <command>VACUUM</command>,
1031 <command>ANALYZE</command>, and <command>CREATE INDEX</command>.
1036 <entry>reltuples</entry>
1037 <entry><type>float4</type></entry>
1040 Number of tuples in the table.
1041 This is only an estimate used by the planner.
1042 It is updated by <command>VACUUM</command>,
1043 <command>ANALYZE</command>, and <command>CREATE INDEX</command>.
1048 <entry>reltoastrelid</entry>
1049 <entry><type>oid</type></entry>
1050 <entry>pg_class.oid</entry>
1052 OID of the TOAST table associated with this table, 0 if none.
1053 The TOAST table stores large attributes <quote>out of
1054 line</quote> in a secondary table.
1059 <entry>reltoastidxid</entry>
1060 <entry><type>oid</type></entry>
1061 <entry>pg_class.oid</entry>
1063 For a TOAST table, the OID of its index. 0 if not a TOAST table.
1068 <entry>relhasindex</entry>
1069 <entry><type>bool</type></entry>
1072 True if this is a table and it has (or recently had) any
1073 indexes. This is set by <command>CREATE INDEX</command>, but
1074 not cleared immediately by <command>DROP INDEX</command>.
1075 <command>VACUUM</command> clears relhasindex if it finds the
1076 table has no indexes.
1081 <entry>relisshared</entry>
1082 <entry><type>bool</type></entry>
1084 <entry>True if this table is shared across all databases in the
1085 cluster. Only certain system catalogs (such as
1086 <structname>pg_database</structname>) are shared.</entry>
1090 <entry>relkind</entry>
1091 <entry><type>char</type></entry>
1094 'r' = ordinary table, 'i' = index, 'S' = sequence, 'v' = view,
1095 'c' = composite type, 's' = special, 't' = TOAST table
1100 <entry>relnatts</entry>
1101 <entry><type>int2</type></entry>
1104 Number of user columns in the relation (system columns not counted).
1105 There must be this many corresponding entries in
1106 <structname>pg_attribute</structname>. See also
1107 <structname>pg_attribute</structname>.<structfield>attnum</structfield>.
1112 <entry>relchecks</entry>
1113 <entry><type>int2</type></entry>
1116 Number of check constraints on the table; see
1117 <structname>pg_constraint</structname> catalog
1122 <entry>reltriggers</entry>
1123 <entry><type>int2</type></entry>
1126 Number of triggers on the table; see
1127 <structname>pg_trigger</structname> catalog
1132 <entry>relukeys</entry>
1133 <entry><type>int2</type></entry>
1135 <entry>unused (<emphasis>Not</emphasis> the number of unique keys)</entry>
1139 <entry>relfkeys</entry>
1140 <entry><type>int2</type></entry>
1142 <entry>unused (<emphasis>Not</emphasis> the number of foreign keys on the table)</entry>
1146 <entry>relrefs</entry>
1147 <entry><type>int2</type></entry>
1149 <entry>unused</entry>
1153 <entry>relhasoids</entry>
1154 <entry><type>bool</type></entry>
1157 True if we generate an OID for each row of the relation.
1162 <entry>relhaspkey</entry>
1163 <entry><type>bool</type></entry>
1166 True if the table has (or once had) a primary key.
1171 <entry>relhasrules</entry>
1172 <entry><type>bool</type></entry>
1174 <entry>Table has rules; see
1175 <structname>pg_rewrite</structname> catalog
1180 <entry>relhassubclass</entry>
1181 <entry><type>bool</type></entry>
1183 <entry>At least one table inherits from this one</entry>
1187 <entry>relacl</entry>
1188 <entry><type>aclitem[]</type></entry>
1191 Access permissions. See the descriptions of
1192 <command>GRANT</command> and <command>REVOKE</command> for
1201 <sect1 id="catalog-pg-constraint">
1202 <title>pg_constraint</title>
1205 This system catalog stores CHECK, PRIMARY KEY, UNIQUE, and FOREIGN KEY
1206 constraints on tables. (Column
1207 constraints are not treated specially. Every column constraint is
1208 equivalent to some table constraint.) See under <command>CREATE
1209 TABLE</command> for more information.
1214 NOT NULL constraints are represented in the <structname>pg_attribute</>
1220 CHECK constraints on domains are stored here, too. Global ASSERTIONS
1221 (a currently-unsupported SQL feature) may someday appear here as well.
1225 <title>pg_constraint Columns</title>
1232 <entry>References</entry>
1233 <entry>Description</entry>
1239 <entry>conname</entry>
1240 <entry><type>name</type></entry>
1242 <entry>Constraint name (not necessarily unique!)</entry>
1246 <entry>connamespace</entry>
1247 <entry><type>oid</type></entry>
1248 <entry>pg_namespace.oid</entry>
1250 The OID of the namespace that contains this constraint
1255 <entry>contype</entry>
1256 <entry><type>char</type></entry>
1259 'c' = check constraint,
1260 'f' = foreign key constraint,
1261 'p' = primary key constraint,
1262 'u' = unique constraint
1267 <entry>condeferrable</entry>
1268 <entry><type>boolean</type></entry>
1270 <entry>Is the constraint deferrable?</entry>
1274 <entry>condeferred</entry>
1275 <entry><type>boolean</type></entry>
1277 <entry>Is the constraint deferred by default?</entry>
1281 <entry>conrelid</entry>
1282 <entry><type>oid</type></entry>
1283 <entry>pg_class.oid</entry>
1284 <entry>The table this constraint is on; 0 if not a table constraint</entry>
1288 <entry>contypid</entry>
1289 <entry><type>oid</type></entry>
1290 <entry>pg_type.oid</entry>
1291 <entry>The domain this constraint is on; 0 if not a domain constraint</entry>
1295 <entry>confrelid</entry>
1296 <entry><type>oid</type></entry>
1297 <entry>pg_class.oid</entry>
1298 <entry>If a foreign key, the referenced table; else 0</entry>
1302 <entry>confupdtype</entry>
1303 <entry><type>char</type></entry>
1305 <entry>Foreign key update action code</entry>
1309 <entry>confdeltype</entry>
1310 <entry><type>char</type></entry>
1312 <entry>Foreign key deletion action code</entry>
1316 <entry>confmatchtype</entry>
1317 <entry><type>char</type></entry>
1319 <entry>Foreign key match type</entry>
1323 <entry>conkey</entry>
1324 <entry><type>int2[]</type></entry>
1325 <entry>pg_attribute.attnum</entry>
1326 <entry>If a table constraint, list of columns which the constraint constrains</entry>
1330 <entry>confkey</entry>
1331 <entry><type>int2[]</type></entry>
1332 <entry>pg_attribute.attnum</entry>
1333 <entry>If a foreign key, list of the referenced columns</entry>
1337 <entry>conbin</entry>
1338 <entry><type>text</type></entry>
1340 <entry>If a check constraint, an internal representation of the expression</entry>
1344 <entry>consrc</entry>
1345 <entry><type>text</type></entry>
1347 <entry>If a check constraint, a human-readable representation of the expression</entry>
1355 <structname>pg_class</structname>.<structfield>relchecks</structfield>
1356 needs to agree with the number of check-constraint entries found in this
1357 table for the given relation.
1363 <sect1 id="catalog-pg-conversion">
1364 <title>pg_conversion</title>
1367 This system catalog stores encoding conversion information. See
1368 <command>CREATE CONVERSION</command> for more information.
1372 <title>pg_conversion Columns</title>
1379 <entry>References</entry>
1380 <entry>Description</entry>
1386 <entry>conname</entry>
1387 <entry><type>name</type></entry>
1389 <entry>Conversion name (unique within a namespace)</entry>
1393 <entry>connamespace</entry>
1394 <entry><type>oid</type></entry>
1395 <entry>pg_namespace.oid</entry>
1397 The OID of the namespace that contains this conversion
1402 <entry>conowner</entry>
1403 <entry><type>int4</type></entry>
1404 <entry>pg_shadow.usesysid</entry>
1405 <entry>Owner (creator) of the namespace</entry>
1409 <entry>conforencoding</entry>
1410 <entry><type>int4</type></entry>
1412 <entry>Source(for) encoding ID</entry>
1416 <entry>contoencoding</entry>
1417 <entry><type>int4</type></entry>
1419 <entry>Destination(to) encoding ID</entry>
1423 <entry>conproc</entry>
1424 <entry><type>regproc</type></entry>
1425 <entry>pg_proc.oid</entry>
1426 <entry>Conversion procedure</entry>
1430 <entry>condefault</entry>
1431 <entry><type>boolean</type></entry>
1433 <entry>true if this is the default conversion</entry>
1442 <sect1 id="catalog-pg-database">
1443 <title>pg_database</title>
1446 The <structname>pg_database</structname> catalog stores information
1447 about the available databases. Databases are created with the
1448 <command>CREATE DATABASE</command> command. Consult the
1449 <citetitle>Administrator's Guide</citetitle> for details about the
1450 meaning of some of the parameters.
1454 Unlike most system catalogs, <structname>pg_database</structname>
1455 is shared across all databases of a cluster: there is only one
1456 copy of <structname>pg_database</structname> per cluster, not
1461 <title>pg_database Columns</title>
1468 <entry>References</entry>
1469 <entry>Description</entry>
1475 <entry>datname</entry>
1476 <entry><type>name</type></entry>
1478 <entry>Database name</entry>
1482 <entry>datdba</entry>
1483 <entry><type>int4</type></entry>
1484 <entry>pg_shadow.usesysid</entry>
1485 <entry>Owner of the database, usually the user who created it</entry>
1489 <entry>encoding</entry>
1490 <entry><type>int4</type></entry>
1492 <entry>Character/multibyte encoding for this database</entry>
1496 <entry>datistemplate</entry>
1497 <entry><type>bool</type></entry>
1500 If true then this database can be used in the
1501 <quote>TEMPLATE</quote> clause of <command>CREATE
1502 DATABASE</command> to create a new database as a clone of
1508 <entry>datallowconn</entry>
1509 <entry><type>bool</type></entry>
1512 If false then no one can connect to this database. This is
1513 used to protect the template0 database from being altered.
1518 <entry>datlastsysoid</entry>
1519 <entry><type>oid</type></entry>
1522 Last system OID in the database; useful
1523 particularly to <application>pg_dump</application>
1528 <entry>datvacuumxid</entry>
1529 <entry><type>xid</type></entry>
1532 All tuples inserted or deleted by transaction IDs before this one
1533 have been marked as known committed or known aborted in this database.
1534 This is used to determine when commit-log space can be recycled.
1539 <entry>datfrozenxid</entry>
1540 <entry><type>xid</type></entry>
1543 All tuples inserted by transaction IDs before this one have been
1544 relabeled with a permanent (<quote>frozen</>) transaction ID in this
1545 database. This is useful to check whether a database must be vacuumed
1546 soon to avoid transaction ID wraparound problems.
1551 <entry>datpath</entry>
1552 <entry><type>text</type></entry>
1555 If the database is stored at an alternative location then this
1556 records the location. It's either an environment variable name
1557 or an absolute path, depending how it was entered.
1562 <entry>datconfig</entry>
1563 <entry><type>text[]</type></entry>
1565 <entry>Session defaults for run-time configuration variables</entry>
1569 <entry>datacl</entry>
1570 <entry><type>aclitem[]</type></entry>
1572 <entry>Access permissions</entry>
1580 <sect1 id="catalog-pg-depend">
1581 <title>pg_depend</title>
1584 The <structname>pg_depend</structname> table records the dependency
1585 relationships between database objects. This information allows
1586 <command>DROP</> commands to find which other objects must be dropped
1587 by <command>DROP CASCADE</>, or prevent dropping in the <command>DROP
1592 <title>pg_depend Columns</title>
1599 <entry>References</entry>
1600 <entry>Description</entry>
1606 <entry>classid</entry>
1607 <entry><type>oid</type></entry>
1608 <entry>pg_class.oid</entry>
1609 <entry>The oid of the system catalog the dependent object is in</entry>
1613 <entry>objid</entry>
1614 <entry><type>oid</type></entry>
1615 <entry>any oid attribute</entry>
1616 <entry>The oid of the specific dependent object</entry>
1620 <entry>objsubid</entry>
1621 <entry><type>int4</type></entry>
1623 <entry>For a table attribute, this is the attribute's
1624 column number (the objid and classid refer to the table itself).
1625 For all other object types, this field is presently zero.
1630 <entry>refclassid</entry>
1631 <entry><type>oid</type></entry>
1632 <entry>pg_class.oid</entry>
1633 <entry>The oid of the system catalog the referenced object is in</entry>
1637 <entry>refobjid</entry>
1638 <entry><type>oid</type></entry>
1639 <entry>any oid attribute</entry>
1640 <entry>The oid of the specific referenced object</entry>
1644 <entry>refobjsubid</entry>
1645 <entry><type>int4</type></entry>
1647 <entry>For a table attribute, this is the attribute's
1648 column number (the refobjid and refclassid refer to the table itself).
1649 For all other object types, this field is presently zero.
1654 <entry>deptype</entry>
1655 <entry><type>char</type></entry>
1658 A code defining the specific semantics of this dependency relationship.
1667 In all cases, a <structname>pg_depend</structname> entry indicates that the
1668 referenced object may not be dropped without also dropping the dependent
1669 object. However, there are several subflavors identified by
1670 <structfield>deptype</>:
1675 DEPENDENCY_NORMAL ('n'): normal relationship between separately-created
1676 objects. The dependent object may be dropped without affecting the
1677 referenced object. The referenced object may only be dropped by
1678 specifying CASCADE, in which case the dependent object is dropped too.
1679 Example: a table column has a normal dependency on its datatype.
1685 DEPENDENCY_AUTO ('a'): the dependent object can be dropped separately
1686 from the referenced object, and should be automatically dropped
1687 (regardless of RESTRICT or CASCADE mode) if the referenced object
1689 Example: a named constraint on a table is made auto-dependent on
1690 the table, so that it will go away if the table is dropped.
1696 DEPENDENCY_INTERNAL ('i'): the dependent object was created as part
1697 of creation of the referenced object, and is really just a part of
1698 its internal implementation. A DROP of the dependent object will be
1699 disallowed outright (we'll tell the user to issue a DROP against the
1700 referenced object, instead). A DROP of the referenced object will be
1701 propagated through to drop the dependent object whether CASCADE is
1703 Example: a trigger that's created to enforce a foreign-key constraint
1704 is made internally dependent on the constraint's pg_constraint entry.
1710 DEPENDENCY_PIN ('p'): there is no dependent object; this type of entry
1711 is a signal that the system itself depends on the referenced object,
1712 and so that object must never be deleted. Entries of this type are
1713 created only during initdb. The fields for the dependent object
1719 Other dependency flavors may be needed in future.
1725 <sect1 id="catalog-pg-description">
1726 <title>pg_description</title>
1729 The pg_description table can store an optional description or
1730 comment for each database object. Descriptions can be manipulated
1731 with the <command>COMMENT</command> command and viewed with
1732 <application>psql</application>'s <literal>\d</literal> commands.
1733 Descriptions of many built-in system objects are provided in the initial
1734 contents of pg_description.
1738 <title>pg_description Columns</title>
1745 <entry>References</entry>
1746 <entry>Description</entry>
1752 <entry>objoid</entry>
1753 <entry><type>oid</type></entry>
1754 <entry>any oid attribute</entry>
1755 <entry>The oid of the object this description pertains to</entry>
1759 <entry>classoid</entry>
1760 <entry><type>oid</type></entry>
1761 <entry>pg_class.oid</entry>
1762 <entry>The oid of the system catalog this object appears in</entry>
1766 <entry>objsubid</entry>
1767 <entry><type>int4</type></entry>
1769 <entry>For a comment on a table attribute, this is the attribute's
1770 column number (the objoid and classoid refer to the table itself).
1771 For all other object types, this field is presently zero.
1776 <entry>description</entry>
1777 <entry><type>text</type></entry>
1779 <entry>Arbitrary text that serves as the description of this object.</entry>
1788 <sect1 id="catalog-pg-group">
1789 <title>pg_group</title>
1792 This catalog defines groups and stores what users belong to what
1793 groups. Groups are created with the <command>CREATE
1794 GROUP</command> command. Consult the <citetitle>Administrator's
1795 Guide</citetitle> for information about user permission management.
1799 Because user and group identities are cluster-wide,
1800 <structname>pg_group</structname>
1801 is shared across all databases of a cluster: there is only one
1802 copy of <structname>pg_group</structname> per cluster, not
1807 <title>pg_group Columns</title>
1814 <entry>References</entry>
1815 <entry>Description</entry>
1821 <entry>groname</entry>
1822 <entry><type>name</type></entry>
1824 <entry>Name of the group</entry>
1828 <entry>grosysid</entry>
1829 <entry><type>int4</type></entry>
1831 <entry>An arbitrary number to identify this group</entry>
1835 <entry>grolist</entry>
1836 <entry><type>int4[]</type></entry>
1837 <entry>pg_shadow.usesysid</entry>
1838 <entry>An array containing the ids of the users in this group</entry>
1847 <sect1 id="catalog-pg-index">
1848 <title>pg_index</title>
1851 <structname>pg_index</structname> contains part of the information
1852 about indexes. The rest is mostly in
1853 <structname>pg_class</structname>.
1857 <title>pg_index Columns</title>
1864 <entry>References</entry>
1865 <entry>Description</entry>
1871 <entry>indexrelid</entry>
1872 <entry><type>oid</type></entry>
1873 <entry>pg_class.oid</entry>
1874 <entry>The OID of the pg_class entry for this index</entry>
1878 <entry>indrelid</entry>
1879 <entry><type>oid</type></entry>
1880 <entry>pg_class.oid</entry>
1881 <entry>The OID of the pg_class entry for the table this index is for</entry>
1885 <entry>indproc</entry>
1886 <entry><type>regproc</type></entry>
1887 <entry>pg_proc.oid</entry>
1888 <entry>The function's OID if this is a functional index,
1893 <entry>indkey</entry>
1894 <entry><type>int2vector</type></entry>
1895 <entry>pg_attribute.attnum</entry>
1897 This is a vector (array) of up to
1898 <symbol>INDEX_MAX_KEYS</symbol> values that indicate which
1899 table columns this index pertains to. For example a value of
1900 <literal>1 3</literal> would mean that the first and the third
1901 column make up the index key. For a functional index, these
1902 columns are the inputs to the function, and the function's return
1903 value is the index key.
1908 <entry>indclass</entry>
1909 <entry><type>oidvector</type></entry>
1910 <entry>pg_opclass.oid</entry>
1912 For each column in the index key this contains a reference to
1913 the <quote>operator class</quote> to use. See
1914 <structname>pg_opclass</structname> for details.
1919 <entry>indisclustered</entry>
1920 <entry><type>bool</type></entry>
1922 <entry>If true, the table was last clustered on this index.</entry>
1926 <entry>indisunique</entry>
1927 <entry><type>bool</type></entry>
1929 <entry>If true, this is a unique index.</entry>
1933 <entry>indisprimary</entry>
1934 <entry><type>bool</type></entry>
1936 <entry>If true, this index represents the primary key of the table.
1937 (indisunique should always be true when this is true.)</entry>
1941 <entry>indreference</entry>
1942 <entry><type>oid</type></entry>
1944 <entry>unused</entry>
1948 <entry>indpred</entry>
1949 <entry><type>text</type></entry>
1951 <entry>Expression tree (in the form of a nodeToString representation)
1952 for partial index predicate. Empty string if not a partial
1962 <sect1 id="catalog-pg-inherits">
1963 <title>pg_inherits</title>
1966 This catalog records information about table inheritance hierarchies.
1970 <title>pg_inherits Columns</title>
1977 <entry>References</entry>
1978 <entry>Description</entry>
1984 <entry>inhrelid</entry>
1985 <entry><type>oid</type></entry>
1986 <entry>pg_class.oid</entry>
1988 The OID of the child table.
1993 <entry>inhparent</entry>
1994 <entry><type>oid</type></entry>
1995 <entry>pg_class.oid</entry>
1997 The OID of the parent table.
2002 <entry>inhseqno</entry>
2003 <entry><type>int4</type></entry>
2006 If there is more than one parent for a child table (multiple
2007 inheritance), this number tells the order in which the
2008 inherited columns are to be arranged. The count starts at 1.
2018 <sect1 id="catalog-pg-language">
2019 <title>pg_language</title>
2022 <structname>pg_language</structname> registers call interfaces or
2023 languages in which you can write functions or stored procedures.
2024 See under <command>CREATE LANGUAGE</command> and in the
2025 <citetitle>Programmer's Guide</citetitle> for more information
2026 about language handlers.
2030 <title>pg_language Columns</title>
2037 <entry>References</entry>
2038 <entry>Description</entry>
2044 <entry>lanname</entry>
2045 <entry><type>name</type></entry>
2047 <entry>Name of the language (to be specified when creating a function)</entry>
2051 <entry>lanispl</entry>
2052 <entry><type>bool</type></entry>
2055 This is false for internal languages (such as
2056 <acronym>SQL</acronym>) and true for user-defined languages.
2057 Currently, <application>pg_dump</application> still uses this
2058 to determine which languages need to be dumped, but this may be
2059 replaced by a different mechanism sometime.
2064 <entry>lanpltrusted</entry>
2065 <entry><type>bool</type></entry>
2068 This is a trusted language. See under <command>CREATE
2069 LANGUAGE</command> what this means. If this is an internal
2070 language (<structfield>lanispl</structfield> is false) then
2071 this field is meaningless.
2076 <entry>lanplcallfoid</entry>
2077 <entry><type>oid</type></entry>
2078 <entry>pg_proc.oid</entry>
2080 For non-internal languages this references the language
2081 handler, which is a special function that is responsible for
2082 executing all functions that are written in the particular
2088 <entry>lanvalidator</entry>
2089 <entry><type>oid</type></entry>
2090 <entry>pg_proc.oid</entry>
2092 This references a language validator function that is responsible
2093 for checking the syntax and validity of new functions when they
2094 are created. See under <command>CREATE LANGUAGE</command> for
2095 further information about validators.
2100 <entry>lanacl</entry>
2101 <entry><type>aclitem[]</type></entry>
2103 <entry>Access permissions</entry>
2112 <sect1 id="catalog-pg-largeobject">
2113 <title>pg_largeobject</title>
2116 <structname>pg_largeobject</structname> holds the data making up
2117 <quote>large objects</quote>. A large object is identified by an
2118 OID assigned when it is created. Each large object is broken into
2119 segments or <quote>pages</> small enough to be conveniently stored as rows
2120 in <structname>pg_largeobject</structname>.
2121 The amount of data per page is defined to be LOBLKSIZE (which is currently
2122 BLCKSZ/4, or typically 2Kbytes).
2126 <title>pg_largeobject Columns</title>
2133 <entry>References</entry>
2134 <entry>Description</entry>
2141 <entry><type>oid</type></entry>
2143 <entry>Identifier of the large object that includes this page</entry>
2147 <entry>pageno</entry>
2148 <entry><type>int4</type></entry>
2150 <entry>Page number of this page within its large object
2151 (counting from zero)</entry>
2156 <entry><type>bytea</type></entry>
2159 Actual data stored in the large object.
2160 This will never be more than LOBLKSIZE bytes, and may be less.
2168 Each row of <structname>pg_largeobject</structname> holds data
2169 for one page of a large object, beginning at
2170 byte offset (pageno * LOBLKSIZE) within the object. The implementation
2171 allows sparse storage: pages may be missing, and may be shorter than
2172 LOBLKSIZE bytes even if they are not the last page of the object.
2173 Missing regions within a large object read as zeroes.
2179 <sect1 id="catalog-pg-listener">
2180 <title>pg_listener</title>
2183 <structname>pg_listener</structname> supports the <command>LISTEN</>
2184 and <command>NOTIFY</> commands. A listener creates an entry in
2185 <structname>pg_listener</structname> for each notification name
2186 it is listening for. A notifier scans <structname>pg_listener</structname>
2187 and updates each matching entry to show that a notification has occurred.
2188 The notifier also sends a signal (using the PID recorded in the table)
2189 to awaken the listener from sleep.
2193 <title>pg_listener Columns</title>
2200 <entry>References</entry>
2201 <entry>Description</entry>
2207 <entry>relname</entry>
2208 <entry><type>name</type></entry>
2210 <entry>Notify condition name. (The name need not match any actual
2211 relation in the database; the term <quote>relname</> is historical.)
2216 <entry>listenerpid</entry>
2217 <entry><type>int4</type></entry>
2219 <entry>PID of the backend process that created this entry.</entry>
2223 <entry>notification</entry>
2224 <entry><type>int4</type></entry>
2227 Zero if no event is pending for this listener. If an event is
2228 pending, the PID of the backend that sent the notification.
2238 <sect1 id="catalog-pg-namespace">
2239 <title>pg_namespace</title>
2242 A namespace is the structure underlying SQL92 schemas: each namespace
2243 can have a separate collection of relations, types, etc without name
2248 <title>pg_namespace Columns</title>
2255 <entry>References</entry>
2256 <entry>Description</entry>
2262 <entry>nspname</entry>
2263 <entry><type>name</type></entry>
2265 <entry>Name of the namespace</entry>
2269 <entry>nspowner</entry>
2270 <entry><type>int4</type></entry>
2271 <entry>pg_shadow.usesysid</entry>
2272 <entry>Owner (creator) of the namespace</entry>
2276 <entry>nspacl</entry>
2277 <entry><type>aclitem[]</type></entry>
2279 <entry>Access permissions</entry>
2288 <sect1 id="catalog-pg-opclass">
2289 <title>pg_opclass</title>
2292 <structname>pg_opclass</structname> defines
2293 index access method operator classes. Each operator class defines
2294 semantics for index columns of a particular datatype and a particular
2295 index access method. Note that there can be multiple operator classes
2296 for a given datatype/access method combination, thus supporting multiple
2301 Operator classes are described at length in the
2302 <citetitle>Programmer's Guide</citetitle>.
2306 <title>pg_opclass Columns</title>
2313 <entry>References</entry>
2314 <entry>Description</entry>
2320 <entry>opcamid</entry>
2321 <entry><type>oid</type></entry>
2322 <entry>pg_am.oid</entry>
2323 <entry>index access method opclass is for</entry>
2327 <entry>opcname</entry>
2328 <entry><type>name</type></entry>
2330 <entry>name of this opclass</entry>
2334 <entry>opcnamespace</entry>
2335 <entry><type>oid</type></entry>
2336 <entry>pg_namespace.oid</entry>
2337 <entry>namespace of this opclass</entry>
2341 <entry>opcowner</entry>
2342 <entry><type>int4</type></entry>
2343 <entry>pg_shadow.usesysid</entry>
2344 <entry>opclass owner</entry>
2348 <entry>opcintype</entry>
2349 <entry><type>oid</type></entry>
2350 <entry>pg_type.oid</entry>
2351 <entry>type of input data for opclass</entry>
2355 <entry>opcdefault</entry>
2356 <entry><type>bool</type></entry>
2358 <entry>true if opclass is default for opcintype</entry>
2362 <entry>opckeytype</entry>
2363 <entry><type>oid</type></entry>
2364 <entry>pg_type.oid</entry>
2365 <entry>type of index data, or zero if same as opcintype</entry>
2373 The majority of the information defining an operator class is actually
2374 not in its <structname>pg_opclass</structname> row, but in the associated
2375 rows in <structname>pg_amop</structname> and
2376 <structname>pg_amproc</structname>. Those rows are considered to be
2377 part of the operator class definition --- this is not unlike the way
2378 that a relation is defined by a single <structname>pg_class</structname>
2379 row, plus associated rows in <structname>pg_attribute</structname> and
2386 <sect1 id="catalog-pg-operator">
2387 <title>pg_operator</title>
2390 See <command>CREATE OPERATOR</command> and the
2391 <citetitle>Programmer's Guide</citetitle> for details on these
2392 operator parameters.
2396 <title>pg_operator Columns</title>
2403 <entry>References</entry>
2404 <entry>Description</entry>
2410 <entry>oprname</entry>
2411 <entry><type>name</type></entry>
2413 <entry>Name of the operator</entry>
2417 <entry>oprnamespace</entry>
2418 <entry><type>oid</type></entry>
2419 <entry>pg_namespace.oid</entry>
2421 The OID of the namespace that contains this operator
2426 <entry>oprowner</entry>
2427 <entry><type>int4</type></entry>
2428 <entry>pg_shadow.usesysid</entry>
2429 <entry>Owner (creator) of the operator</entry>
2433 <entry>oprkind</entry>
2434 <entry><type>char</type></entry>
2437 'b' = infix (<quote>both</quote>), 'l' = prefix
2438 (<quote>left</quote>), 'r' = postfix (<quote>right</quote>)
2443 <entry>oprcanhash</entry>
2444 <entry><type>bool</type></entry>
2446 <entry>This operator supports hash joins.</entry>
2450 <entry>oprleft</entry>
2451 <entry><type>oid</type></entry>
2452 <entry>pg_type.oid</entry>
2453 <entry>Type of the left operand</entry>
2457 <entry>oprright</entry>
2458 <entry><type>oid</type></entry>
2459 <entry>pg_type.oid</entry>
2460 <entry>Type of the right operand</entry>
2464 <entry>oprresult</entry>
2465 <entry><type>oid</type></entry>
2466 <entry>pg_type.oid</entry>
2467 <entry>Type of the result</entry>
2471 <entry>oprcom</entry>
2472 <entry><type>oid</type></entry>
2473 <entry>pg_operator.oid</entry>
2474 <entry>Commutator of this operator, if any</entry>
2478 <entry>oprnegate</entry>
2479 <entry><type>oid</type></entry>
2480 <entry>pg_operator.oid</entry>
2481 <entry>Negator of this operator, if any</entry>
2485 <entry>oprlsortop</entry>
2486 <entry><type>oid</type></entry>
2487 <entry>pg_operator.oid</entry>
2489 If this operator supports merge joins, the operator that sorts
2490 the type of the left-hand operand (<literal>L<L</>)
2495 <entry>oprrsortop</entry>
2496 <entry><type>oid</type></entry>
2497 <entry>pg_operator.oid</entry>
2499 If this operator supports merge joins, the operator that sorts
2500 the type of the right-hand operand (<literal>R<R</>)
2505 <entry>oprltcmpop</entry>
2506 <entry><type>oid</type></entry>
2507 <entry>pg_operator.oid</entry>
2509 If this operator supports merge joins, the less-than operator that
2510 compares the left and right operand types (<literal>L<R</>)
2515 <entry>oprgtcmpop</entry>
2516 <entry><type>oid</type></entry>
2517 <entry>pg_operator.oid</entry>
2519 If this operator supports merge joins, the greater-than operator that
2520 compares the left and right operand types (<literal>L>R</>)
2525 <entry>oprcode</entry>
2526 <entry><type>regproc</type></entry>
2527 <entry>pg_proc.oid</entry>
2528 <entry>Function that implements this operator</entry>
2532 <entry>oprrest</entry>
2533 <entry><type>regproc</type></entry>
2534 <entry>pg_proc.oid</entry>
2535 <entry>Restriction selectivity estimation function for this operator</entry>
2539 <entry>oprjoin</entry>
2540 <entry><type>regproc</type></entry>
2541 <entry>pg_proc.oid</entry>
2542 <entry>Join selectivity estimation function for this operator</entry>
2549 Unused fields contain zeroes, for example oprleft is zero for a
2556 <sect1 id="catalog-pg-proc">
2557 <title>pg_proc</title>
2560 This catalog stores information about functions (or procedures).
2561 The description of <command>CREATE FUNCTION</command> and the
2562 <citetitle>Programmer's Guide</citetitle> contain more information
2563 about the meaning of some fields.
2567 The table contains data for aggregate functions as well as plain functions.
2568 If <structfield>proisagg</structfield> is true, there should be a matching
2569 row in <structname>pg_aggregate</structname>.
2573 <title>pg_proc Columns</title>
2580 <entry>References</entry>
2581 <entry>Description</entry>
2587 <entry>proname</entry>
2588 <entry><type>name</type></entry>
2590 <entry>Name of the function</entry>
2594 <entry>pronamespace</entry>
2595 <entry><type>oid</type></entry>
2596 <entry>pg_namespace.oid</entry>
2598 The OID of the namespace that contains this function
2603 <entry>proowner</entry>
2604 <entry><type>int4</type></entry>
2605 <entry>pg_shadow.usesysid</entry>
2606 <entry>Owner (creator) of the function</entry>
2610 <entry>prolang</entry>
2611 <entry><type>oid</type></entry>
2612 <entry>pg_language.oid</entry>
2613 <entry>Implementation language or call interface of this function</entry>
2617 <entry>proisagg</entry>
2618 <entry><type>bool</type></entry>
2620 <entry>Function is an aggregate function</entry>
2624 <entry>prosecdef</entry>
2625 <entry><type>bool</type></entry>
2627 <entry>Function is a security definer (i.e., a <quote>setuid</>
2632 <entry>proisstrict</entry>
2633 <entry><type>bool</type></entry>
2636 Function returns null if any call argument is null. In that
2637 case the function won't actually be called at all. Functions
2638 that are not <quote>strict</quote> must be prepared to handle
2644 <entry>proretset</entry>
2645 <entry><type>bool</type></entry>
2647 <entry>Function returns a set (ie, multiple values of the specified
2652 <entry>provolatile</entry>
2653 <entry><type>char</type></entry>
2656 <structfield>provolatile</structfield> tells whether the function's
2657 result depends only on its input arguments, or is affected by outside
2659 It is <literal>i</literal> for <quote>immutable</> functions,
2660 which always deliver the same result for the same inputs.
2661 It is <literal>s</literal> for <quote>stable</> functions,
2662 whose results (for fixed inputs) do not change within a scan.
2663 It is <literal>v</literal> for <quote>volatile</> functions,
2664 whose results may change at any time. (Use <literal>v</literal> also
2665 for functions with side-effects, so that calls to them cannot get
2671 <entry>pronargs</entry>
2672 <entry><type>int2</type></entry>
2674 <entry>Number of arguments</entry>
2678 <entry>prorettype</entry>
2679 <entry><type>oid</type></entry>
2680 <entry>pg_type.oid</entry>
2681 <entry>Data type of the return value</entry>
2685 <entry>proargtypes</entry>
2686 <entry><type>oidvector</type></entry>
2687 <entry>pg_type.oid</entry>
2688 <entry>A vector with the data types of the function arguments</entry>
2692 <entry>prosrc</entry>
2693 <entry><type>text</type></entry>
2696 This tells the function handler how to invoke the function. It
2697 might be the actual source code of the function for interpreted
2698 languages, a link symbol, a file name, or just about anything
2699 else, depending on the implementation language/call convention.
2704 <entry>probin</entry>
2705 <entry><type>bytea</type></entry>
2707 <entry>Additional information about how to invoke the function.
2708 Again, the interpretation is language-specific.
2713 <entry>proacl</entry>
2714 <entry><type>aclitem[]</type></entry>
2716 <entry>Access permissions</entry>
2723 Currently, prosrc contains the function's C-language name (link symbol)
2724 for compiled functions, both built-in and dynamically loaded. For all
2725 other language types, prosrc contains the function's source text.
2729 Currently, probin is unused except for dynamically-loaded C functions,
2730 for which it gives the name of the shared library file containing the
2736 <sect1 id="catalog-pg-rewrite">
2737 <title>pg_rewrite</title>
2740 This system catalog stores rewrite rules for tables and views.
2744 <title>pg_rewrite Columns</title>
2751 <entry>References</entry>
2752 <entry>Description</entry>
2758 <entry>rulename</entry>
2759 <entry><type>name</type></entry>
2761 <entry>Rule name</entry>
2765 <entry>ev_class</entry>
2766 <entry><type>oid</type></entry>
2767 <entry>pg_class.oid</entry>
2768 <entry>The table this rule is for</entry>
2772 <entry>ev_attr</entry>
2773 <entry><type>int2</type></entry>
2775 <entry>The column this rule is for (currently, always zero to
2776 indicate the whole table)</entry>
2780 <entry>ev_type</entry>
2781 <entry><type>char</type></entry>
2783 <entry>Event type that the rule is for: '1' = SELECT,
2784 '2' = UPDATE, '3' = INSERT, '4' = DELETE</entry>
2788 <entry>is_instead</entry>
2789 <entry><type>bool</type></entry>
2791 <entry>True if the rule is an INSTEAD rule</entry>
2795 <entry>ev_qual</entry>
2796 <entry><type>text</type></entry>
2798 <entry>Expression tree (in the form of a nodeToString representation)
2799 for the rule's qualifying condition</entry>
2803 <entry>ev_action</entry>
2804 <entry><type>text</type></entry>
2806 <entry>Query tree (in the form of a nodeToString representation)
2807 for the rule's action</entry>
2815 <structname>pg_class</structname>.<structfield>relhasrules</structfield>
2816 must be true if a table has any rules in this catalog.
2823 <sect1 id="catalog-pg-shadow">
2824 <title>pg_shadow</title>
2827 <structname>pg_shadow</structname> contains information about
2828 database users. The name stems from the fact that this table
2829 should not be readable by the public since it contains passwords.
2830 <structname>pg_user</structname> is a publicly readable view on
2831 <structname>pg_shadow</structname> that blanks out the password field.
2835 The <citetitle>Administrator's Guide</citetitle> contains detailed
2836 information about user and permission management.
2840 Because user identities are cluster-wide,
2841 <structname>pg_shadow</structname>
2842 is shared across all databases of a cluster: there is only one
2843 copy of <structname>pg_shadow</structname> per cluster, not
2848 <title>pg_shadow Columns</title>
2855 <entry>References</entry>
2856 <entry>Description</entry>
2862 <entry>usename</entry>
2863 <entry><type>name</type></entry>
2865 <entry>User name</entry>
2869 <entry>usesysid</entry>
2870 <entry><type>int4</type></entry>
2872 <entry>User id (arbitrary number used to reference this user)</entry>
2876 <entry>usecreatedb</entry>
2877 <entry><type>bool</type></entry>
2879 <entry>User may create databases</entry>
2883 <entry>usesuper</entry>
2884 <entry><type>bool</type></entry>
2886 <entry>User is a superuser</entry>
2890 <entry>usecatupd</entry>
2891 <entry><type>bool</type></entry>
2894 User may update system catalogs. (Even a superuser may not do
2895 this unless this attribute is true.)
2900 <entry>passwd</entry>
2901 <entry><type>text</type></entry>
2903 <entry>Password</entry>
2907 <entry>valuntil</entry>
2908 <entry><type>abstime</type></entry>
2910 <entry>Account expiry time (only used for password authentication)</entry>
2914 <entry>useconfig</entry>
2915 <entry><type>text[]</type></entry>
2917 <entry>Session defaults for run-time configuration variables</entry>
2926 <sect1 id="catalog-pg-statistic">
2927 <title>pg_statistic</title>
2930 <structname>pg_statistic</structname> stores statistical data about
2931 the contents of the database. Entries are created by
2932 <command>ANALYZE</command> and subsequently used by the query planner.
2933 There is one entry for each table column that has been analyzed.
2934 Note that all the statistical data is inherently approximate,
2935 even assuming that it is up-to-date.
2939 Since different kinds of statistics may be appropriate for different
2940 kinds of data, <structname>pg_statistic</structname> is designed not
2941 to assume very much about what sort of statistics it stores. Only
2942 extremely general statistics (such as NULL-ness) are given dedicated
2943 columns in <structname>pg_statistic</structname>. Everything else
2944 is stored in <quote>slots</quote>, which are groups of associated columns whose
2945 content is identified by a code number in one of the slot's columns.
2946 For more information see
2947 <filename>src/include/catalog/pg_statistic.h</filename>.
2951 <structname>pg_statistic</structname> should not be readable by the
2952 public, since even statistical information about a table's contents
2953 may be considered sensitive. (Example: minimum and maximum values
2954 of a salary column might be quite interesting.)
2955 <structname>pg_stats</structname> is a publicly readable view on
2956 <structname>pg_statistic</structname> that only exposes information
2957 about those tables that are readable by the current user.
2958 <structname>pg_stats</structname> is also designed to present the
2959 information in a more readable format than the underlying
2960 <structname>pg_statistic</structname> table --- at the cost that
2961 its schema must be extended whenever new slot types are added.
2965 <title>pg_statistic Columns</title>
2972 <entry>References</entry>
2973 <entry>Description</entry>
2979 <entry>starelid</entry>
2980 <entry><type>oid</type></entry>
2981 <entry>pg_class.oid</entry>
2982 <entry>The table that the described column belongs to</entry>
2986 <entry>staattnum</entry>
2987 <entry><type>int2</type></entry>
2988 <entry>pg_attribute.attnum</entry>
2989 <entry>The number of the described column</entry>
2993 <entry>stanullfrac</entry>
2994 <entry><type>float4</type></entry>
2996 <entry>The fraction of the column's entries that are NULL</entry>
3000 <entry>stawidth</entry>
3001 <entry><type>int4</type></entry>
3003 <entry>The average stored width, in bytes, of non-NULL entries</entry>
3007 <entry>stadistinct</entry>
3008 <entry><type>float4</type></entry>
3010 <entry>The number of distinct non-NULL data values in the column.
3011 A value greater than zero is the actual number of distinct values.
3012 A value less than zero is the negative of a fraction of the number
3013 of rows in the table (for example, a column in which values appear about
3014 twice on the average could be represented by stadistinct = -0.5).
3015 A zero value means the number of distinct values is unknown.
3020 <entry>stakindN</entry>
3021 <entry><type>int2</type></entry>
3023 <entry>A code number indicating the kind of statistics stored in the Nth
3024 <quote>slot</quote> of the <structname>pg_statistic</structname> row.
3029 <entry>staopN</entry>
3030 <entry><type>oid</type></entry>
3031 <entry>pg_operator.oid</entry>
3032 <entry>An operator used to derive the statistics stored in the
3033 Nth <quote>slot</quote>. For example, a histogram slot would show the <literal><</literal>
3034 operator that defines the sort order of the data.
3039 <entry>stanumbersN</entry>
3040 <entry><type>float4[]</type></entry>
3042 <entry>Numerical statistics of the appropriate kind for the Nth
3043 <quote>slot</quote>, or NULL if the slot kind does not involve numerical values.
3048 <entry>stavaluesN</entry>
3049 <entry><type>text[]</type></entry>
3051 <entry>Column data values of the appropriate kind for the Nth
3052 <quote>slot</quote>, or NULL if the slot kind does not store any data values.
3053 For data-type independence, all column data values are converted
3054 to external textual form and stored as TEXT datums.
3064 <sect1 id="catalog-pg-trigger">
3065 <title>pg_trigger</title>
3068 This system catalog stores triggers on tables. See under
3069 <command>CREATE TRIGGER</command> for more information.
3073 <title>pg_trigger Columns</title>
3080 <entry>References</entry>
3081 <entry>Description</entry>
3087 <entry>tgrelid</entry>
3088 <entry><type>oid</type></entry>
3089 <entry>pg_class.oid</entry>
3090 <entry>The table this trigger is on</entry>
3094 <entry>tgname</entry>
3095 <entry><type>name</type></entry>
3097 <entry>Trigger name (must be unique among triggers of same table)</entry>
3101 <entry>tgfoid</entry>
3102 <entry><type>oid</type></entry>
3103 <entry>pg_proc.oid</entry>
3104 <entry>The function to be called</entry>
3108 <entry>tgtype</entry>
3109 <entry><type>int2</type></entry>
3111 <entry>Bitmask identifying trigger conditions</entry>
3115 <entry>tgenabled</entry>
3116 <entry><type>bool</type></entry>
3118 <entry>True if trigger is enabled (not presently checked everywhere
3119 it should be, so disabling a trigger by setting this false does not
3120 work reliably)</entry>
3124 <entry>tgisconstraint</entry>
3125 <entry><type>bool</type></entry>
3127 <entry>True if trigger implements an RI constraint</entry>
3131 <entry>tgconstrname</entry>
3132 <entry><type>name</type></entry>
3134 <entry>RI constraint name</entry>
3138 <entry>tgconstrrelid</entry>
3139 <entry><type>oid</type></entry>
3140 <entry>pg_class.oid</entry>
3141 <entry>The table referenced by an RI constraint</entry>
3145 <entry>tgdeferrable</entry>
3146 <entry><type>bool</type></entry>
3148 <entry>True if deferrable</entry>
3152 <entry>tginitdeferred</entry>
3153 <entry><type>bool</type></entry>
3155 <entry>True if initially deferred</entry>
3159 <entry>tgnargs</entry>
3160 <entry><type>int2</type></entry>
3162 <entry>Number of argument strings passed to trigger function</entry>
3166 <entry>tgattr</entry>
3167 <entry><type>int2vector</type></entry>
3169 <entry>Currently unused</entry>
3173 <entry>tgargs</entry>
3174 <entry><type>bytea</type></entry>
3176 <entry>Argument strings to pass to trigger, each null-terminated</entry>
3184 <structname>pg_class</structname>.<structfield>reltriggers</structfield>
3185 needs to match up with the entries in this table.
3192 <sect1 id="catalog-pg-type">
3193 <title>pg_type</title>
3196 This catalog stores information about data types. Scalar types
3197 (<quote>base types</>) are created with <command>CREATE TYPE</command>.
3198 A complex type is automatically created for each table in the database, to
3199 represent the row structure of the table. It is also possible to create
3200 complex types with <command>CREATE TYPE AS</command>, and
3201 derived types with <command>CREATE DOMAIN</command>.
3205 <title>pg_type Columns</title>
3212 <entry>References</entry>
3213 <entry>Description</entry>
3219 <entry>typname</entry>
3220 <entry><type>name</type></entry>
3222 <entry>Data type name</entry>
3226 <entry>typnamespace</entry>
3227 <entry><type>oid</type></entry>
3228 <entry>pg_namespace.oid</entry>
3230 The OID of the namespace that contains this type
3235 <entry>typowner</entry>
3236 <entry><type>int4</type></entry>
3237 <entry>pg_shadow.usesysid</entry>
3238 <entry>Owner (creator) of the type</entry>
3242 <entry>typlen</entry>
3243 <entry><type>int2</type></entry>
3246 For a fixed-size type, <structfield>typlen</structfield> is the number
3247 of bytes in the internal representation of the type. But for a
3248 variable-length type, <structfield>typlen</structfield> is negative.
3249 -1 indicates a <quote>varlena</> type (one that has a length word),
3250 -2 indicates a null-terminated C string.
3255 <entry>typbyval</entry>
3256 <entry><type>bool</type></entry>
3259 <structfield>typbyval</structfield> determines whether internal
3260 routines pass a value of this type by value or by reference.
3261 Only <type>char</type>, <type>short</type>, and
3262 <type>int</type> equivalent items can be passed by value, so if
3263 the type is not 1, 2, or 4 bytes long,
3264 <productname>PostgreSQL</> does not have
3265 the option of passing by value and so
3266 <structfield>typbyval</structfield> had better be false.
3267 Variable-length types are always passed by reference. Note that
3268 <structfield>typbyval</structfield> can be false even if the
3269 length would allow pass-by-value; this is currently true for
3270 type <type>float4</type>, for example.
3275 <entry>typtype</entry>
3276 <entry><type>char</type></entry>
3279 <structfield>typtype</structfield> is <literal>b</literal> for
3280 a base type, <literal>c</literal> for a complex type (i.e.,
3281 a table's row type), <literal>d</literal> for a derived type (i.e.,
3282 a domain), or <literal>p</literal> for a pseudo-type. See also
3283 <structfield>typrelid</structfield>
3284 and <structfield>typbasetype</structfield>.
3289 <entry>typisdefined</entry>
3290 <entry><type>bool</type></entry>
3292 <entry>True if the type is defined, false if this is a placeholder
3293 entry for a not-yet-defined type. When typisdefined is false,
3294 nothing except the type name, namespace, and OID can be relied on.
3299 <entry>typdelim</entry>
3300 <entry><type>char</type></entry>
3302 <entry>Character that separates two values of this type when parsing
3303 array input. Note that the delimiter is associated with the array
3304 element data type, not the array data type.</entry>
3308 <entry>typrelid</entry>
3309 <entry><type>oid</type></entry>
3310 <entry>pg_class.oid</entry>
3312 If this is a complex type (see
3313 <structfield>typtype</structfield>), then this field points to
3314 the <structname>pg_class</structname> entry that defines the
3315 corresponding table. (For a free-standing composite type, the
3316 <structname>pg_class</structname> entry doesn't really represent
3317 a table, but it is needed anyway for the type's
3318 <structname>pg_attribute</structname> entries to link to.)
3319 Zero for non-complex types.
3324 <entry>typelem</entry>
3325 <entry><type>oid</type></entry>
3326 <entry>pg_type.oid</entry>
3328 If <structfield>typelem</structfield> is not 0 then it
3329 identifies another row in <structname>pg_type</structname>.
3330 The current type can then be subscripted like an array yielding
3331 values of type <structfield>typelem</structfield>. A
3332 <quote>true</quote> array type is variable length
3333 (<structfield>typlen</structfield> = -1),
3334 but some fixed-length (<structfield>typlen</structfield> > 0) types
3335 also have nonzero <structfield>typelem</structfield>, for example
3336 <type>name</type> and <type>oidvector</type>.
3337 If a fixed-length type has a <structfield>typelem</structfield> then
3338 its internal representation must be N values of the
3339 <structfield>typelem</structfield> data type with no other data.
3340 Variable-length array types have a header defined by the array
3346 <entry>typinput</entry>
3347 <entry><type>regproc</type></entry>
3348 <entry>pg_proc.oid</entry>
3349 <entry>Input conversion function</entry>
3353 <entry>typoutput</entry>
3354 <entry><type>regproc</type></entry>
3355 <entry>pg_proc.oid</entry>
3356 <entry>Output conversion function</entry>
3360 <entry>typalign</entry>
3361 <entry><type>char</type></entry>
3365 <structfield>typalign</structfield> is the alignment required
3366 when storing a value of this type. It applies to storage on
3367 disk as well as most representations of the value inside
3368 <productname>PostgreSQL</>.
3369 When multiple values are stored consecutively, such
3370 as in the representation of a complete row on disk, padding is
3371 inserted before a datum of this type so that it begins on the
3372 specified boundary. The alignment reference is the beginning
3373 of the first datum in the sequence.
3375 Possible values are:
3378 <para>'c' = CHAR alignment, i.e., no alignment needed.</para>
3381 <para>'s' = SHORT alignment (2 bytes on most machines).</para>
3384 <para>'i' = INT alignment (4 bytes on most machines).</para>
3387 <para>'d' = DOUBLE alignment (8 bytes on many machines, but by no means all).</para>
3392 For types used in system tables, it is critical that the size
3393 and alignment defined in <structname>pg_type</structname>
3394 agree with the way that the compiler will lay out the field in
3395 a struct representing a table row.
3401 <entry>typstorage</entry>
3402 <entry><type>char</type></entry>
3405 <structfield>typstorage</structfield> tells for varlena
3406 types (those with <structfield>typlen</structfield> = -1) if
3407 the type is prepared for toasting and what the default strategy
3408 for attributes of this type should be.
3412 <para>'p': Value must always be stored plain.</para>
3416 'e': Value can be stored in a <quote>secondary</quote>
3417 relation (if relation has one, see
3418 <structname>pg_class</structname>.<structfield>reltoastrelid</structfield>).
3422 <para>'m': Value can be stored compressed inline.</para>
3425 <para>'x': Value can be stored compressed inline or in <quote>secondary</quote>.</para>
3428 Note that 'm' fields can also be moved out to secondary
3429 storage, but only as a last resort ('e' and 'x' fields are
3435 <entry>typnotnull</entry>
3436 <entry><type>bool</type></entry>
3439 <structfield>typnotnull</structfield> represents a NOT NULL
3440 constraint on a type. Presently used for domains only.
3445 <entry>typbasetype</entry>
3446 <entry><type>oid</type></entry>
3447 <entry>pg_type.oid</entry>
3449 If this is a derived type (see <structfield>typtype</structfield>),
3450 then <structfield>typbasetype</structfield> identifies
3451 the type that this one is based on. Zero if not a derived type.
3456 <entry>typtypmod</entry>
3457 <entry><type>int4</type></entry>
3460 Domains use <structfield>typtypmod</structfield> to record the typmod
3461 to be applied to their base type (-1 if base type does not use a
3462 typmod). -1 if this type is not a domain.
3467 <entry>typndims</entry>
3468 <entry><type>int4</type></entry>
3471 <structfield>typndims</structfield> is the number of array dimensions
3472 for a domain that is an array (that is, typbasetype is an array type;
3473 the domain's typelem will match the base type's typelem).
3474 Zero for non-domains and non-array domains.
3479 <entry>typdefaultbin</entry>
3480 <entry><type>text</type></entry>
3483 If <structfield>typdefaultbin</> is not NULL, it is the nodeToString
3484 representation of a default expression for the type. Currently this is
3485 only used for domains.
3490 <entry>typdefault</entry>
3491 <entry><type>text</type></entry>
3494 <structfield>typdefault</> is NULL if the type has no associated
3495 default value. If <structfield>typdefaultbin</> is not NULL,
3496 <structfield>typdefault</> must contain a human-readable version of the
3497 default expression represented by <structfield>typdefaultbin</>. If
3498 <structfield>typdefaultbin</> is NULL and <structfield>typdefault</> is
3499 not, then <structfield>typdefault</> is the external representation of
3500 the type's default value, which may be fed to the type's input
3501 converter to produce a constant.
3510 <!-- Keep this comment at the end of the file
3515 sgml-minimize-attributes:nil
3516 sgml-always-quote-attributes:t
3518 sgml-indent-tabs-mode:nil
3520 sgml-parent-document:nil
3521 sgml-default-dtd-file:"./reference.ced"
3522 sgml-exposed-tags:nil
3523 sgml-local-catalogs:("/usr/share/sgml/catalog")
3524 sgml-local-ecat-files:nil