1 <!-- doc/src/sgml/information_schema.sgml -->
3 <chapter id="information-schema">
4 <title>The Information Schema</title>
6 <indexterm zone="information-schema">
7 <primary>information schema</primary>
11 The information schema consists of a set of views that contain
12 information about the objects defined in the current database. The
13 information schema is defined in the SQL standard and can therefore
14 be expected to be portable and remain stable — unlike the system
15 catalogs, which are specific to
16 <productname>PostgreSQL</productname> and are modeled after
17 implementation concerns. The information schema views do not,
18 however, contain information about
19 <productname>PostgreSQL</productname>-specific features; to inquire
20 about those you need to query the system catalogs or other
21 <productname>PostgreSQL</productname>-specific views.
26 When querying the database for constraint information, it is possible
27 for a standard-compliant query that expects to return one row to
28 return several. This is because the SQL standard requires constraint
29 names to be unique within a schema, but
30 <productname>PostgreSQL</productname> does not enforce this
31 restriction. <productname>PostgreSQL</productname>
32 automatically-generated constraint names avoid duplicates in the
33 same schema, but users can specify such duplicate names.
37 This problem can appear when querying information schema views such
38 as <literal>check_constraint_routine_usage</literal>,
39 <literal>check_constraints</literal>, <literal>domain_constraints</literal>, and
40 <literal>referential_constraints</literal>. Some other views have similar
41 issues but contain the table name to help distinguish duplicate
42 rows, e.g., <literal>constraint_column_usage</literal>,
43 <literal>constraint_table_usage</literal>, <literal>table_constraints</literal>.
48 <sect1 id="infoschema-schema">
49 <title>The Schema</title>
52 The information schema itself is a schema named
53 <literal>information_schema</literal>. This schema automatically
54 exists in all databases. The owner of this schema is the initial
55 database user in the cluster, and that user naturally has all the
56 privileges on this schema, including the ability to drop it (but
57 the space savings achieved by that are minuscule).
61 By default, the information schema is not in the schema search
62 path, so you need to access all objects in it through qualified
63 names. Since the names of some of the objects in the information
64 schema are generic names that might occur in user applications, you
65 should be careful if you want to put the information schema in the
70 <sect1 id="infoschema-datatypes">
71 <title>Data Types</title>
74 The columns of the information schema views use special data types
75 that are defined in the information schema. These are defined as
76 simple domains over ordinary built-in types. You should not use
77 these types for work outside the information schema, but your
78 applications must be prepared for them if they select from the
87 <term><type>cardinal_number</type></term>
90 A nonnegative integer.
96 <term><type>character_data</type></term>
99 A character string (without specific maximum length).
105 <term><type>sql_identifier</type></term>
108 A character string. This type is used for SQL identifiers, the
109 type <type>character_data</type> is used for any other kind of
116 <term><type>time_stamp</type></term>
119 A domain over the type <type>timestamp with time zone</type>
125 <term><type>yes_or_no</type></term>
128 A character string domain that contains
129 either <literal>YES</literal> or <literal>NO</literal>. This
130 is used to represent Boolean (true/false) data in the
131 information schema. (The information schema was invented
132 before the type <type>boolean</type> was added to the SQL
133 standard, so this convention is necessary to keep the
134 information schema backward compatible.)
140 Every column in the information schema has one of these five types.
144 <sect1 id="infoschema-information-schema-catalog-name">
145 <title><literal>information_schema_catalog_name</literal></title>
148 <literal>information_schema_catalog_name</literal> is a table that
149 always contains one row and one column containing the name of the
150 current database (current catalog, in SQL terminology).
154 <title><literal>information_schema_catalog_name</literal> Columns</title>
160 <entry>Data Type</entry>
161 <entry>Description</entry>
167 <entry><literal>catalog_name</literal></entry>
168 <entry><type>sql_identifier</type></entry>
169 <entry>Name of the database that contains this information schema</entry>
176 <sect1 id="infoschema-administrable-role-authorizations">
177 <title><literal>administrable_role_authorizations</literal></title>
180 The view <literal>administrable_role_authorizations</literal>
181 identifies all roles that the current user has the admin option
186 <title><literal>administrable_role_authorizations</literal> Columns</title>
192 <entry>Data Type</entry>
193 <entry>Description</entry>
199 <entry><literal>grantee</literal></entry>
200 <entry><type>sql_identifier</type></entry>
202 Name of the role to which this role membership was granted (can
203 be the current user, or a different role in case of nested role
209 <entry><literal>role_name</literal></entry>
210 <entry><type>sql_identifier</type></entry>
211 <entry>Name of a role</entry>
215 <entry><literal>is_grantable</literal></entry>
216 <entry><type>yes_or_no</type></entry>
217 <entry>Always <literal>YES</literal></entry>
224 <sect1 id="infoschema-applicable-roles">
225 <title><literal>applicable_roles</literal></title>
228 The view <literal>applicable_roles</literal> identifies all roles
229 whose privileges the current user can use. This means there is
230 some chain of role grants from the current user to the role in
231 question. The current user itself is also an applicable role. The
232 set of applicable roles is generally used for permission checking.
233 <indexterm><primary>applicable role</primary></indexterm>
234 <indexterm><primary>role</primary><secondary>applicable</secondary></indexterm>
238 <title><literal>applicable_roles</literal> Columns</title>
244 <entry>Data Type</entry>
245 <entry>Description</entry>
251 <entry><literal>grantee</literal></entry>
252 <entry><type>sql_identifier</type></entry>
254 Name of the role to which this role membership was granted (can
255 be the current user, or a different role in case of nested role
261 <entry><literal>role_name</literal></entry>
262 <entry><type>sql_identifier</type></entry>
263 <entry>Name of a role</entry>
267 <entry><literal>is_grantable</literal></entry>
268 <entry><type>yes_or_no</type></entry>
270 <literal>YES</literal> if the grantee has the admin option on
271 the role, <literal>NO</literal> if not
279 <sect1 id="infoschema-attributes">
280 <title><literal>attributes</literal></title>
283 The view <literal>attributes</literal> contains information about
284 the attributes of composite data types defined in the database.
285 (Note that the view does not give information about table columns,
286 which are sometimes called attributes in PostgreSQL contexts.)
287 Only those attributes are shown that the current user has access to (by way
288 of being the owner of or having some privilege on the type).
292 <title><literal>attributes</literal> Columns</title>
298 <entry>Data Type</entry>
299 <entry>Description</entry>
305 <entry><literal>udt_catalog</literal></entry>
306 <entry><type>sql_identifier</type></entry>
307 <entry>Name of the database containing the data type (always the current database)</entry>
311 <entry><literal>udt_schema</literal></entry>
312 <entry><type>sql_identifier</type></entry>
313 <entry>Name of the schema containing the data type</entry>
317 <entry><literal>udt_name</literal></entry>
318 <entry><type>sql_identifier</type></entry>
319 <entry>Name of the data type</entry>
323 <entry><literal>attribute_name</literal></entry>
324 <entry><type>sql_identifier</type></entry>
325 <entry>Name of the attribute</entry>
329 <entry><literal>ordinal_position</literal></entry>
330 <entry><type>cardinal_number</type></entry>
331 <entry>Ordinal position of the attribute within the data type (count starts at 1)</entry>
335 <entry><literal>attribute_default</literal></entry>
336 <entry><type>character_data</type></entry>
337 <entry>Default expression of the attribute</entry>
341 <entry><literal>is_nullable</literal></entry>
342 <entry><type>yes_or_no</type></entry>
344 <literal>YES</literal> if the attribute is possibly nullable,
345 <literal>NO</literal> if it is known not nullable.
350 <entry><literal>data_type</literal></entry>
351 <entry><type>character_data</type></entry>
353 Data type of the attribute, if it is a built-in type, or
354 <literal>ARRAY</literal> if it is some array (in that case, see
355 the view <literal>element_types</literal>), else
356 <literal>USER-DEFINED</literal> (in that case, the type is
357 identified in <literal>attribute_udt_name</literal> and
363 <entry><literal>character_maximum_length</literal></entry>
364 <entry><type>cardinal_number</type></entry>
366 If <literal>data_type</literal> identifies a character or bit
367 string type, the declared maximum length; null for all other
368 data types or if no maximum length was declared.
373 <entry><literal>character_octet_length</literal></entry>
374 <entry><type>cardinal_number</type></entry>
376 If <literal>data_type</literal> identifies a character type,
377 the maximum possible length in octets (bytes) of a datum; null
378 for all other data types. The maximum octet length depends on
379 the declared character maximum length (see above) and the
385 <entry><literal>character_set_catalog</literal></entry>
386 <entry><type>sql_identifier</type></entry>
387 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
391 <entry><literal>character_set_schema</literal></entry>
392 <entry><type>sql_identifier</type></entry>
393 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
397 <entry><literal>character_set_name</literal></entry>
398 <entry><type>sql_identifier</type></entry>
399 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
403 <entry><literal>collation_catalog</literal></entry>
404 <entry><type>sql_identifier</type></entry>
406 Name of the database containing the collation of the attribute
407 (always the current database), null if default or the data type
408 of the attribute is not collatable
413 <entry><literal>collation_schema</literal></entry>
414 <entry><type>sql_identifier</type></entry>
416 Name of the schema containing the collation of the attribute,
417 null if default or the data type of the attribute is not
423 <entry><literal>collation_name</literal></entry>
424 <entry><type>sql_identifier</type></entry>
426 Name of the collation of the attribute, null if default or the
427 data type of the attribute is not collatable
432 <entry><literal>numeric_precision</literal></entry>
433 <entry><type>cardinal_number</type></entry>
435 If <literal>data_type</literal> identifies a numeric type, this
436 column contains the (declared or implicit) precision of the
437 type for this attribute. The precision indicates the number of
438 significant digits. It can be expressed in decimal (base 10)
439 or binary (base 2) terms, as specified in the column
440 <literal>numeric_precision_radix</literal>. For all other data
441 types, this column is null.
446 <entry><literal>numeric_precision_radix</literal></entry>
447 <entry><type>cardinal_number</type></entry>
449 If <literal>data_type</literal> identifies a numeric type, this
450 column indicates in which base the values in the columns
451 <literal>numeric_precision</literal> and
452 <literal>numeric_scale</literal> are expressed. The value is
453 either 2 or 10. For all other data types, this column is null.
458 <entry><literal>numeric_scale</literal></entry>
459 <entry><type>cardinal_number</type></entry>
461 If <literal>data_type</literal> identifies an exact numeric
462 type, this column contains the (declared or implicit) scale of
463 the type for this attribute. The scale indicates the number of
464 significant digits to the right of the decimal point. It can
465 be expressed in decimal (base 10) or binary (base 2) terms, as
466 specified in the column
467 <literal>numeric_precision_radix</literal>. For all other data
468 types, this column is null.
473 <entry><literal>datetime_precision</literal></entry>
474 <entry><type>cardinal_number</type></entry>
476 If <literal>data_type</literal> identifies a date, time,
477 timestamp, or interval type, this column contains the (declared
478 or implicit) fractional seconds precision of the type for this
479 attribute, that is, the number of decimal digits maintained
480 following the decimal point in the seconds value. For all
481 other data types, this column is null.
486 <entry><literal>interval_type</literal></entry>
487 <entry><type>character_data</type></entry>
489 If <literal>data_type</literal> identifies an interval type,
490 this column contains the specification which fields the
491 intervals include for this attribute, e.g., <literal>YEAR TO
492 MONTH</literal>, <literal>DAY TO SECOND</literal>, etc. If no
493 field restrictions were specified (that is, the interval
494 accepts all fields), and for all other data types, this field
500 <entry><literal>interval_precision</literal></entry>
501 <entry><type>cardinal_number</type></entry>
503 Applies to a feature not available
504 in <productname>PostgreSQL</productname>
505 (see <literal>datetime_precision</literal> for the fractional
506 seconds precision of interval type attributes)
511 <entry><literal>attribute_udt_catalog</literal></entry>
512 <entry><type>sql_identifier</type></entry>
514 Name of the database that the attribute data type is defined in
515 (always the current database)
520 <entry><literal>attribute_udt_schema</literal></entry>
521 <entry><type>sql_identifier</type></entry>
523 Name of the schema that the attribute data type is defined in
528 <entry><literal>attribute_udt_name</literal></entry>
529 <entry><type>sql_identifier</type></entry>
531 Name of the attribute data type
536 <entry><literal>scope_catalog</literal></entry>
537 <entry><type>sql_identifier</type></entry>
538 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
542 <entry><literal>scope_schema</literal></entry>
543 <entry><type>sql_identifier</type></entry>
544 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
548 <entry><literal>scope_name</literal></entry>
549 <entry><type>sql_identifier</type></entry>
550 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
554 <entry><literal>maximum_cardinality</literal></entry>
555 <entry><type>cardinal_number</type></entry>
556 <entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</productname></entry>
560 <entry><literal>dtd_identifier</literal></entry>
561 <entry><type>sql_identifier</type></entry>
563 An identifier of the data type descriptor of the column, unique
564 among the data type descriptors pertaining to the table. This
565 is mainly useful for joining with other instances of such
566 identifiers. (The specific format of the identifier is not
567 defined and not guaranteed to remain the same in future
573 <entry><literal>is_derived_reference_attribute</literal></entry>
574 <entry><type>yes_or_no</type></entry>
575 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
582 See also under <xref linkend="infoschema-columns"/>, a similarly
583 structured view, for further information on some of the columns.
587 <sect1 id="infoschema-character-sets">
588 <title><literal>character_sets</literal></title>
591 The view <literal>character_sets</literal> identifies the character
592 sets available in the current database. Since PostgreSQL does not
593 support multiple character sets within one database, this view only
594 shows one, which is the database encoding.
598 Take note of how the following terms are used in the SQL standard:
601 <term>character repertoire</term>
604 An abstract collection of characters, for
605 example <literal>UNICODE</literal>, <literal>UCS</literal>, or
606 <literal>LATIN1</literal>. Not exposed as an SQL object, but
607 visible in this view.
613 <term>character encoding form</term>
616 An encoding of some character repertoire. Most older character
617 repertoires only use one encoding form, and so there are no
618 separate names for them (e.g., <literal>LATIN1</literal> is an
619 encoding form applicable to the <literal>LATIN1</literal>
620 repertoire). But for example Unicode has the encoding forms
621 <literal>UTF8</literal>, <literal>UTF16</literal>, etc. (not
622 all supported by PostgreSQL). Encoding forms are not exposed
623 as an SQL object, but are visible in this view.
629 <term>character set</term>
632 A named SQL object that identifies a character repertoire, a
633 character encoding, and a default collation. A predefined
634 character set would typically have the same name as an encoding
635 form, but users could define other names. For example, the
636 character set <literal>UTF8</literal> would typically identify
637 the character repertoire <literal>UCS</literal>, encoding
638 form <literal>UTF8</literal>, and some default collation.
644 You can think of an <quote>encoding</quote> in PostgreSQL either as
645 a character set or a character encoding form. They will have the
646 same name, and there can only be one in one database.
650 <title><literal>character_sets</literal> Columns</title>
656 <entry>Data Type</entry>
657 <entry>Description</entry>
663 <entry><literal>character_set_catalog</literal></entry>
664 <entry><literal>sql_identifier</literal></entry>
665 <entry>Character sets are currently not implemented as schema objects, so this column is null.</entry>
669 <entry><literal>character_set_schema</literal></entry>
670 <entry><literal>sql_identifier</literal></entry>
671 <entry>Character sets are currently not implemented as schema objects, so this column is null.</entry>
675 <entry><literal>character_set_name</literal></entry>
676 <entry><literal>sql_identifier</literal></entry>
677 <entry>Name of the character set, currently implemented as showing the name of the database encoding</entry>
681 <entry><literal>character_repertoire</literal></entry>
682 <entry><literal>sql_identifier</literal></entry>
683 <entry>Character repertoire, showing <literal>UCS</literal> if the encoding is <literal>UTF8</literal>, else just the encoding name</entry>
687 <entry><literal>form_of_use</literal></entry>
688 <entry><literal>sql_identifier</literal></entry>
689 <entry>Character encoding form, same as the database encoding</entry>
693 <entry><literal>default_collate_catalog</literal></entry>
694 <entry><literal>sql_identifier</literal></entry>
695 <entry>Name of the database containing the default collation (always the current database, if any collation is identified)</entry>
699 <entry><literal>default_collate_schema</literal></entry>
700 <entry><literal>sql_identifier</literal></entry>
701 <entry>Name of the schema containing the default collation</entry>
705 <entry><literal>default_collate_name</literal></entry>
706 <entry><literal>sql_identifier</literal></entry>
708 Name of the default collation. The default collation is
709 identified as the collation that matches
710 the <literal>COLLATE</literal> and <literal>CTYPE</literal>
711 settings of the current database. If there is no such
712 collation, then this column and the associated schema and
713 catalog columns are null.
721 <sect1 id="infoschema-check-constraint-routine-usage">
722 <title><literal>check_constraint_routine_usage</literal></title>
725 The view <literal>check_constraint_routine_usage</literal>
726 identifies routines (functions and procedures) that are used by a
727 check constraint. Only those routines are shown that are owned by
728 a currently enabled role.
732 <title><literal>check_constraint_routine_usage</literal> Columns</title>
738 <entry>Data Type</entry>
739 <entry>Description</entry>
745 <entry><literal>constraint_catalog</literal></entry>
746 <entry><literal>sql_identifier</literal></entry>
747 <entry>Name of the database containing the constraint (always the current database)</entry>
751 <entry><literal>constraint_schema</literal></entry>
752 <entry><literal>sql_identifier</literal></entry>
753 <entry>Name of the schema containing the constraint</entry>
757 <entry><literal>constraint_name</literal></entry>
758 <entry><literal>sql_identifier</literal></entry>
759 <entry>Name of the constraint</entry>
763 <entry><literal>specific_catalog</literal></entry>
764 <entry><literal>sql_identifier</literal></entry>
765 <entry>Name of the database containing the function (always the current database)</entry>
769 <entry><literal>specific_schema</literal></entry>
770 <entry><literal>sql_identifier</literal></entry>
771 <entry>Name of the schema containing the function</entry>
775 <entry><literal>specific_name</literal></entry>
776 <entry><literal>sql_identifier</literal></entry>
778 The <quote>specific name</quote> of the function. See <xref
779 linkend="infoschema-routines"/> for more information.
787 <sect1 id="infoschema-check-constraints">
788 <title><literal>check_constraints</literal></title>
791 The view <literal>check_constraints</literal> contains all check
792 constraints, either defined on a table or on a domain, that are
793 owned by a currently enabled role. (The owner of the table or
794 domain is the owner of the constraint.)
798 <title><literal>check_constraints</literal> Columns</title>
804 <entry>Data Type</entry>
805 <entry>Description</entry>
811 <entry><literal>constraint_catalog</literal></entry>
812 <entry><literal>sql_identifier</literal></entry>
813 <entry>Name of the database containing the constraint (always the current database)</entry>
817 <entry><literal>constraint_schema</literal></entry>
818 <entry><literal>sql_identifier</literal></entry>
819 <entry>Name of the schema containing the constraint</entry>
823 <entry><literal>constraint_name</literal></entry>
824 <entry><literal>sql_identifier</literal></entry>
825 <entry>Name of the constraint</entry>
829 <entry><literal>check_clause</literal></entry>
830 <entry><literal>character_data</literal></entry>
831 <entry>The check expression of the check constraint</entry>
838 <sect1 id="infoschema-collations">
839 <title><literal>collations</literal></title>
842 The view <literal>collations</literal> contains the collations
843 available in the current database.
847 <title><literal>collations</literal> Columns</title>
853 <entry>Data Type</entry>
854 <entry>Description</entry>
860 <entry><literal>collation_catalog</literal></entry>
861 <entry><literal>sql_identifier</literal></entry>
862 <entry>Name of the database containing the collation (always the current database)</entry>
866 <entry><literal>collation_schema</literal></entry>
867 <entry><literal>sql_identifier</literal></entry>
868 <entry>Name of the schema containing the collation</entry>
872 <entry><literal>collation_name</literal></entry>
873 <entry><literal>sql_identifier</literal></entry>
874 <entry>Name of the default collation</entry>
878 <entry><literal>pad_attribute</literal></entry>
879 <entry><literal>character_data</literal></entry>
881 Always <literal>NO PAD</literal> (The alternative <literal>PAD
882 SPACE</literal> is not supported by PostgreSQL.)
890 <sect1 id="infoschema-collation-character-set-applicab"> <!-- max 44 characters -->
891 <title><literal>collation_character_set_applicability</literal></title>
894 The view <literal>collation_character_set_applicability</literal>
895 identifies which character set the available collations are
896 applicable to. In PostgreSQL, there is only one character set per
897 database (see explanation
898 in <xref linkend="infoschema-character-sets"/>), so this view does
899 not provide much useful information.
903 <title><literal>collation_character_set_applicability</literal> Columns</title>
909 <entry>Data Type</entry>
910 <entry>Description</entry>
916 <entry><literal>collation_catalog</literal></entry>
917 <entry><literal>sql_identifier</literal></entry>
918 <entry>Name of the database containing the collation (always the current database)</entry>
922 <entry><literal>collation_schema</literal></entry>
923 <entry><literal>sql_identifier</literal></entry>
924 <entry>Name of the schema containing the collation</entry>
928 <entry><literal>collation_name</literal></entry>
929 <entry><literal>sql_identifier</literal></entry>
930 <entry>Name of the default collation</entry>
934 <entry><literal>character_set_catalog</literal></entry>
935 <entry><literal>sql_identifier</literal></entry>
936 <entry>Character sets are currently not implemented as schema objects, so this column is null</entry>
940 <entry><literal>character_set_schema</literal></entry>
941 <entry><literal>sql_identifier</literal></entry>
942 <entry>Character sets are currently not implemented as schema objects, so this column is null</entry>
946 <entry><literal>character_set_name</literal></entry>
947 <entry><literal>sql_identifier</literal></entry>
948 <entry>Name of the character set</entry>
955 <sect1 id="infoschema-column-column-usage">
956 <title><literal>column_column_usage</literal></title>
959 The view <literal>column_column_usage</literal> identifies all generated
960 columns that depend on another base column in the same table. Only tables
961 owned by a currently enabled role are included.
965 <title><literal>column_column_usage</literal> Columns</title>
971 <entry>Data Type</entry>
972 <entry>Description</entry>
978 <entry><literal>table_catalog</literal></entry>
979 <entry><type>sql_identifier</type></entry>
980 <entry>Name of the database containing the table (always the current database)</entry>
984 <entry><literal>table_schema</literal></entry>
985 <entry><type>sql_identifier</type></entry>
986 <entry>Name of the schema containing the table</entry>
990 <entry><literal>table_name</literal></entry>
991 <entry><type>sql_identifier</type></entry>
992 <entry>Name of the table</entry>
996 <entry><literal>column_name</literal></entry>
997 <entry><type>sql_identifier</type></entry>
998 <entry>Name of the base column that a generated column depends on</entry>
1002 <entry><literal>dependent_column</literal></entry>
1003 <entry><type>sql_identifier</type></entry>
1004 <entry>Name of the generated column</entry>
1011 <sect1 id="infoschema-column-domain-usage">
1012 <title><literal>column_domain_usage</literal></title>
1015 The view <literal>column_domain_usage</literal> identifies all
1016 columns (of a table or a view) that make use of some domain defined
1017 in the current database and owned by a currently enabled role.
1021 <title><literal>column_domain_usage</literal> Columns</title>
1027 <entry>Data Type</entry>
1028 <entry>Description</entry>
1034 <entry><literal>domain_catalog</literal></entry>
1035 <entry><type>sql_identifier</type></entry>
1036 <entry>Name of the database containing the domain (always the current database)</entry>
1040 <entry><literal>domain_schema</literal></entry>
1041 <entry><type>sql_identifier</type></entry>
1042 <entry>Name of the schema containing the domain</entry>
1046 <entry><literal>domain_name</literal></entry>
1047 <entry><type>sql_identifier</type></entry>
1048 <entry>Name of the domain</entry>
1052 <entry><literal>table_catalog</literal></entry>
1053 <entry><type>sql_identifier</type></entry>
1054 <entry>Name of the database containing the table (always the current database)</entry>
1058 <entry><literal>table_schema</literal></entry>
1059 <entry><type>sql_identifier</type></entry>
1060 <entry>Name of the schema containing the table</entry>
1064 <entry><literal>table_name</literal></entry>
1065 <entry><type>sql_identifier</type></entry>
1066 <entry>Name of the table</entry>
1070 <entry><literal>column_name</literal></entry>
1071 <entry><type>sql_identifier</type></entry>
1072 <entry>Name of the column</entry>
1079 <sect1 id="infoschema-column-options">
1080 <title><literal>column_options</literal></title>
1083 The view <literal>column_options</literal> contains all the
1084 options defined for foreign table columns in the current database. Only
1085 those foreign table columns are shown that the current user has access to
1086 (by way of being the owner or having some privilege).
1090 <title><literal>column_options</literal> Columns</title>
1096 <entry>Data Type</entry>
1097 <entry>Description</entry>
1103 <entry><literal>table_catalog</literal></entry>
1104 <entry><type>sql_identifier</type></entry>
1105 <entry>Name of the database that contains the foreign table (always the current database)</entry>
1109 <entry><literal>table_schema</literal></entry>
1110 <entry><type>sql_identifier</type></entry>
1111 <entry>Name of the schema that contains the foreign table</entry>
1115 <entry><literal>table_name</literal></entry>
1116 <entry><type>sql_identifier</type></entry>
1117 <entry>Name of the foreign table</entry>
1121 <entry><literal>column_name</literal></entry>
1122 <entry><type>sql_identifier</type></entry>
1123 <entry>Name of the column</entry>
1127 <entry><literal>option_name</literal></entry>
1128 <entry><type>sql_identifier</type></entry>
1129 <entry>Name of an option</entry>
1133 <entry><literal>option_value</literal></entry>
1134 <entry><type>character_data</type></entry>
1135 <entry>Value of the option</entry>
1142 <sect1 id="infoschema-column-privileges">
1143 <title><literal>column_privileges</literal></title>
1146 The view <literal>column_privileges</literal> identifies all
1147 privileges granted on columns to a currently enabled role or by a
1148 currently enabled role. There is one row for each combination of
1149 column, grantor, and grantee.
1153 If a privilege has been granted on an entire table, it will show up in
1154 this view as a grant for each column, but only for the
1155 privilege types where column granularity is possible:
1156 <literal>SELECT</literal>, <literal>INSERT</literal>,
1157 <literal>UPDATE</literal>, <literal>REFERENCES</literal>.
1161 <title><literal>column_privileges</literal> Columns</title>
1167 <entry>Data Type</entry>
1168 <entry>Description</entry>
1174 <entry><literal>grantor</literal></entry>
1175 <entry><type>sql_identifier</type></entry>
1176 <entry>Name of the role that granted the privilege</entry>
1180 <entry><literal>grantee</literal></entry>
1181 <entry><type>sql_identifier</type></entry>
1182 <entry>Name of the role that the privilege was granted to</entry>
1186 <entry><literal>table_catalog</literal></entry>
1187 <entry><type>sql_identifier</type></entry>
1188 <entry>Name of the database that contains the table that contains the column (always the current database)</entry>
1192 <entry><literal>table_schema</literal></entry>
1193 <entry><type>sql_identifier</type></entry>
1194 <entry>Name of the schema that contains the table that contains the column</entry>
1198 <entry><literal>table_name</literal></entry>
1199 <entry><type>sql_identifier</type></entry>
1200 <entry>Name of the table that contains the column</entry>
1204 <entry><literal>column_name</literal></entry>
1205 <entry><type>sql_identifier</type></entry>
1206 <entry>Name of the column</entry>
1210 <entry><literal>privilege_type</literal></entry>
1211 <entry><type>character_data</type></entry>
1213 Type of the privilege: <literal>SELECT</literal>,
1214 <literal>INSERT</literal>, <literal>UPDATE</literal>, or
1215 <literal>REFERENCES</literal>
1220 <entry><literal>is_grantable</literal></entry>
1221 <entry><type>yes_or_no</type></entry>
1222 <entry><literal>YES</literal> if the privilege is grantable, <literal>NO</literal> if not</entry>
1229 <sect1 id="infoschema-column-udt-usage">
1230 <title><literal>column_udt_usage</literal></title>
1233 The view <literal>column_udt_usage</literal> identifies all columns
1234 that use data types owned by a currently enabled role. Note that in
1235 <productname>PostgreSQL</productname>, built-in data types behave
1236 like user-defined types, so they are included here as well. See
1237 also <xref linkend="infoschema-columns"/> for details.
1241 <title><literal>column_udt_usage</literal> Columns</title>
1247 <entry>Data Type</entry>
1248 <entry>Description</entry>
1254 <entry><literal>udt_catalog</literal></entry>
1255 <entry><type>sql_identifier</type></entry>
1257 Name of the database that the column data type (the underlying
1258 type of the domain, if applicable) is defined in (always the
1264 <entry><literal>udt_schema</literal></entry>
1265 <entry><type>sql_identifier</type></entry>
1267 Name of the schema that the column data type (the underlying
1268 type of the domain, if applicable) is defined in
1273 <entry><literal>udt_name</literal></entry>
1274 <entry><type>sql_identifier</type></entry>
1276 Name of the column data type (the underlying type of the
1277 domain, if applicable)
1282 <entry><literal>table_catalog</literal></entry>
1283 <entry><type>sql_identifier</type></entry>
1284 <entry>Name of the database containing the table (always the current database)</entry>
1288 <entry><literal>table_schema</literal></entry>
1289 <entry><type>sql_identifier</type></entry>
1290 <entry>Name of the schema containing the table</entry>
1294 <entry><literal>table_name</literal></entry>
1295 <entry><type>sql_identifier</type></entry>
1296 <entry>Name of the table</entry>
1300 <entry><literal>column_name</literal></entry>
1301 <entry><type>sql_identifier</type></entry>
1302 <entry>Name of the column</entry>
1309 <sect1 id="infoschema-columns">
1310 <title><literal>columns</literal></title>
1313 The view <literal>columns</literal> contains information about all
1314 table columns (or view columns) in the database. System columns
1315 (<literal>ctid</literal>, etc.) are not included. Only those columns are
1316 shown that the current user has access to (by way of being the
1317 owner or having some privilege).
1321 <title><literal>columns</literal> Columns</title>
1327 <entry>Data Type</entry>
1328 <entry>Description</entry>
1334 <entry><literal>table_catalog</literal></entry>
1335 <entry><type>sql_identifier</type></entry>
1336 <entry>Name of the database containing the table (always the current database)</entry>
1340 <entry><literal>table_schema</literal></entry>
1341 <entry><type>sql_identifier</type></entry>
1342 <entry>Name of the schema containing the table</entry>
1346 <entry><literal>table_name</literal></entry>
1347 <entry><type>sql_identifier</type></entry>
1348 <entry>Name of the table</entry>
1352 <entry><literal>column_name</literal></entry>
1353 <entry><type>sql_identifier</type></entry>
1354 <entry>Name of the column</entry>
1358 <entry><literal>ordinal_position</literal></entry>
1359 <entry><type>cardinal_number</type></entry>
1360 <entry>Ordinal position of the column within the table (count starts at 1)</entry>
1364 <entry><literal>column_default</literal></entry>
1365 <entry><type>character_data</type></entry>
1366 <entry>Default expression of the column</entry>
1370 <entry><literal>is_nullable</literal></entry>
1371 <entry><type>yes_or_no</type></entry>
1373 <literal>YES</literal> if the column is possibly nullable,
1374 <literal>NO</literal> if it is known not nullable. A not-null
1375 constraint is one way a column can be known not nullable, but
1376 there can be others.
1381 <entry><literal>data_type</literal></entry>
1382 <entry><type>character_data</type></entry>
1384 Data type of the column, if it is a built-in type, or
1385 <literal>ARRAY</literal> if it is some array (in that case, see
1386 the view <literal>element_types</literal>), else
1387 <literal>USER-DEFINED</literal> (in that case, the type is
1388 identified in <literal>udt_name</literal> and associated
1389 columns). If the column is based on a domain, this column
1390 refers to the type underlying the domain (and the domain is
1391 identified in <literal>domain_name</literal> and associated
1397 <entry><literal>character_maximum_length</literal></entry>
1398 <entry><type>cardinal_number</type></entry>
1400 If <literal>data_type</literal> identifies a character or bit
1401 string type, the declared maximum length; null for all other
1402 data types or if no maximum length was declared.
1407 <entry><literal>character_octet_length</literal></entry>
1408 <entry><type>cardinal_number</type></entry>
1410 If <literal>data_type</literal> identifies a character type,
1411 the maximum possible length in octets (bytes) of a datum; null
1412 for all other data types. The maximum octet length depends on
1413 the declared character maximum length (see above) and the
1419 <entry><literal>numeric_precision</literal></entry>
1420 <entry><type>cardinal_number</type></entry>
1422 If <literal>data_type</literal> identifies a numeric type, this
1423 column contains the (declared or implicit) precision of the
1424 type for this column. The precision indicates the number of
1425 significant digits. It can be expressed in decimal (base 10)
1426 or binary (base 2) terms, as specified in the column
1427 <literal>numeric_precision_radix</literal>. For all other data
1428 types, this column is null.
1433 <entry><literal>numeric_precision_radix</literal></entry>
1434 <entry><type>cardinal_number</type></entry>
1436 If <literal>data_type</literal> identifies a numeric type, this
1437 column indicates in which base the values in the columns
1438 <literal>numeric_precision</literal> and
1439 <literal>numeric_scale</literal> are expressed. The value is
1440 either 2 or 10. For all other data types, this column is null.
1445 <entry><literal>numeric_scale</literal></entry>
1446 <entry><type>cardinal_number</type></entry>
1448 If <literal>data_type</literal> identifies an exact numeric
1449 type, this column contains the (declared or implicit) scale of
1450 the type for this column. The scale indicates the number of
1451 significant digits to the right of the decimal point. It can
1452 be expressed in decimal (base 10) or binary (base 2) terms, as
1453 specified in the column
1454 <literal>numeric_precision_radix</literal>. For all other data
1455 types, this column is null.
1460 <entry><literal>datetime_precision</literal></entry>
1461 <entry><type>cardinal_number</type></entry>
1463 If <literal>data_type</literal> identifies a date, time,
1464 timestamp, or interval type, this column contains the (declared
1465 or implicit) fractional seconds precision of the type for this
1466 column, that is, the number of decimal digits maintained
1467 following the decimal point in the seconds value. For all
1468 other data types, this column is null.
1473 <entry><literal>interval_type</literal></entry>
1474 <entry><type>character_data</type></entry>
1476 If <literal>data_type</literal> identifies an interval type,
1477 this column contains the specification which fields the
1478 intervals include for this column, e.g., <literal>YEAR TO
1479 MONTH</literal>, <literal>DAY TO SECOND</literal>, etc. If no
1480 field restrictions were specified (that is, the interval
1481 accepts all fields), and for all other data types, this field
1487 <entry><literal>interval_precision</literal></entry>
1488 <entry><type>cardinal_number</type></entry>
1490 Applies to a feature not available
1491 in <productname>PostgreSQL</productname>
1492 (see <literal>datetime_precision</literal> for the fractional
1493 seconds precision of interval type columns)
1498 <entry><literal>character_set_catalog</literal></entry>
1499 <entry><type>sql_identifier</type></entry>
1500 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
1504 <entry><literal>character_set_schema</literal></entry>
1505 <entry><type>sql_identifier</type></entry>
1506 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
1510 <entry><literal>character_set_name</literal></entry>
1511 <entry><type>sql_identifier</type></entry>
1512 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
1516 <entry><literal>collation_catalog</literal></entry>
1517 <entry><type>sql_identifier</type></entry>
1519 Name of the database containing the collation of the column
1520 (always the current database), null if default or the data type
1521 of the column is not collatable
1526 <entry><literal>collation_schema</literal></entry>
1527 <entry><type>sql_identifier</type></entry>
1529 Name of the schema containing the collation of the column, null
1530 if default or the data type of the column is not collatable
1535 <entry><literal>collation_name</literal></entry>
1536 <entry><type>sql_identifier</type></entry>
1538 Name of the collation of the column, null if default or the
1539 data type of the column is not collatable
1544 <entry><literal>domain_catalog</literal></entry>
1545 <entry><type>sql_identifier</type></entry>
1547 If the column has a domain type, the name of the database that
1548 the domain is defined in (always the current database), else
1554 <entry><literal>domain_schema</literal></entry>
1555 <entry><type>sql_identifier</type></entry>
1557 If the column has a domain type, the name of the schema that
1558 the domain is defined in, else null.
1563 <entry><literal>domain_name</literal></entry>
1564 <entry><type>sql_identifier</type></entry>
1565 <entry>If the column has a domain type, the name of the domain, else null.</entry>
1569 <entry><literal>udt_catalog</literal></entry>
1570 <entry><type>sql_identifier</type></entry>
1572 Name of the database that the column data type (the underlying
1573 type of the domain, if applicable) is defined in (always the
1579 <entry><literal>udt_schema</literal></entry>
1580 <entry><type>sql_identifier</type></entry>
1582 Name of the schema that the column data type (the underlying
1583 type of the domain, if applicable) is defined in
1588 <entry><literal>udt_name</literal></entry>
1589 <entry><type>sql_identifier</type></entry>
1591 Name of the column data type (the underlying type of the
1592 domain, if applicable)
1597 <entry><literal>scope_catalog</literal></entry>
1598 <entry><type>sql_identifier</type></entry>
1599 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
1603 <entry><literal>scope_schema</literal></entry>
1604 <entry><type>sql_identifier</type></entry>
1605 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
1609 <entry><literal>scope_name</literal></entry>
1610 <entry><type>sql_identifier</type></entry>
1611 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
1615 <entry><literal>maximum_cardinality</literal></entry>
1616 <entry><type>cardinal_number</type></entry>
1617 <entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</productname></entry>
1621 <entry><literal>dtd_identifier</literal></entry>
1622 <entry><type>sql_identifier</type></entry>
1624 An identifier of the data type descriptor of the column, unique
1625 among the data type descriptors pertaining to the table. This
1626 is mainly useful for joining with other instances of such
1627 identifiers. (The specific format of the identifier is not
1628 defined and not guaranteed to remain the same in future
1634 <entry><literal>is_self_referencing</literal></entry>
1635 <entry><type>yes_or_no</type></entry>
1636 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
1640 <entry><literal>is_identity</literal></entry>
1641 <entry><type>yes_or_no</type></entry>
1643 If the column is an identity column, then <literal>YES</literal>,
1644 else <literal>NO</literal>.
1649 <entry><literal>identity_generation</literal></entry>
1650 <entry><type>character_data</type></entry>
1652 If the column is an identity column, then <literal>ALWAYS</literal>
1653 or <literal>BY DEFAULT</literal>, reflecting the definition of the
1659 <entry><literal>identity_start</literal></entry>
1660 <entry><type>character_data</type></entry>
1662 If the column is an identity column, then the start value of the
1663 internal sequence, else null.
1668 <entry><literal>identity_increment</literal></entry>
1669 <entry><type>character_data</type></entry>
1671 If the column is an identity column, then the increment of the internal
1672 sequence, else null.
1677 <entry><literal>identity_maximum</literal></entry>
1678 <entry><type>character_data</type></entry>
1680 If the column is an identity column, then the maximum value of the
1681 internal sequence, else null.
1686 <entry><literal>identity_minimum</literal></entry>
1687 <entry><type>character_data</type></entry>
1689 If the column is an identity column, then the minimum value of the
1690 internal sequence, else null.
1695 <entry><literal>identity_cycle</literal></entry>
1696 <entry><type>yes_or_no</type></entry>
1698 If the column is an identity column, then <literal>YES</literal> if the
1699 internal sequence cycles or <literal>NO</literal> if it does not;
1705 <entry><literal>is_generated</literal></entry>
1706 <entry><type>character_data</type></entry>
1708 If the column is a generated column, then <literal>ALWAYS</literal>,
1709 else <literal>NEVER</literal>.
1714 <entry><literal>generation_expression</literal></entry>
1715 <entry><type>character_data</type></entry>
1717 If the column is a generated column, then the generation expression,
1723 <entry><literal>is_updatable</literal></entry>
1724 <entry><type>yes_or_no</type></entry>
1726 <literal>YES</literal> if the column is updatable,
1727 <literal>NO</literal> if not (Columns in base tables are always
1728 updatable, columns in views not necessarily)
1736 Since data types can be defined in a variety of ways in SQL, and
1737 <productname>PostgreSQL</productname> contains additional ways to
1738 define data types, their representation in the information schema
1739 can be somewhat difficult. The column <literal>data_type</literal>
1740 is supposed to identify the underlying built-in type of the column.
1741 In <productname>PostgreSQL</productname>, this means that the type
1742 is defined in the system catalog schema
1743 <literal>pg_catalog</literal>. This column might be useful if the
1744 application can handle the well-known built-in types specially (for
1745 example, format the numeric types differently or use the data in
1746 the precision columns). The columns <literal>udt_name</literal>,
1747 <literal>udt_schema</literal>, and <literal>udt_catalog</literal>
1748 always identify the underlying data type of the column, even if the
1749 column is based on a domain. (Since
1750 <productname>PostgreSQL</productname> treats built-in types like
1751 user-defined types, built-in types appear here as well. This is an
1752 extension of the SQL standard.) These columns should be used if an
1753 application wants to process data differently according to the
1754 type, because in that case it wouldn't matter if the column is
1755 really based on a domain. If the column is based on a domain, the
1756 identity of the domain is stored in the columns
1757 <literal>domain_name</literal>, <literal>domain_schema</literal>,
1758 and <literal>domain_catalog</literal>. If you want to pair up
1759 columns with their associated data types and treat domains as
1760 separate types, you could write <literal>coalesce(domain_name,
1761 udt_name)</literal>, etc.
1765 <sect1 id="infoschema-constraint-column-usage">
1766 <title><literal>constraint_column_usage</literal></title>
1769 The view <literal>constraint_column_usage</literal> identifies all
1770 columns in the current database that are used by some constraint.
1771 Only those columns are shown that are contained in a table owned by
1772 a currently enabled role. For a check constraint, this view
1773 identifies the columns that are used in the check expression. For
1774 a foreign key constraint, this view identifies the columns that the
1775 foreign key references. For a unique or primary key constraint,
1776 this view identifies the constrained columns.
1780 <title><literal>constraint_column_usage</literal> Columns</title>
1786 <entry>Data Type</entry>
1787 <entry>Description</entry>
1793 <entry><literal>table_catalog</literal></entry>
1794 <entry><type>sql_identifier</type></entry>
1796 Name of the database that contains the table that contains the
1797 column that is used by some constraint (always the current
1803 <entry><literal>table_schema</literal></entry>
1804 <entry><type>sql_identifier</type></entry>
1806 Name of the schema that contains the table that contains the
1807 column that is used by some constraint
1812 <entry><literal>table_name</literal></entry>
1813 <entry><type>sql_identifier</type></entry>
1815 Name of the table that contains the column that is used by some
1821 <entry><literal>column_name</literal></entry>
1822 <entry><type>sql_identifier</type></entry>
1824 Name of the column that is used by some constraint
1829 <entry><literal>constraint_catalog</literal></entry>
1830 <entry><type>sql_identifier</type></entry>
1831 <entry>Name of the database that contains the constraint (always the current database)</entry>
1835 <entry><literal>constraint_schema</literal></entry>
1836 <entry><type>sql_identifier</type></entry>
1837 <entry>Name of the schema that contains the constraint</entry>
1841 <entry><literal>constraint_name</literal></entry>
1842 <entry><type>sql_identifier</type></entry>
1843 <entry>Name of the constraint</entry>
1850 <sect1 id="infoschema-constraint-table-usage">
1851 <title><literal>constraint_table_usage</literal></title>
1854 The view <literal>constraint_table_usage</literal> identifies all
1855 tables in the current database that are used by some constraint and
1856 are owned by a currently enabled role. (This is different from the
1857 view <literal>table_constraints</literal>, which identifies all
1858 table constraints along with the table they are defined on.) For a
1859 foreign key constraint, this view identifies the table that the
1860 foreign key references. For a unique or primary key constraint,
1861 this view simply identifies the table the constraint belongs to.
1862 Check constraints and not-null constraints are not included in this
1867 <title><literal>constraint_table_usage</literal> Columns</title>
1873 <entry>Data Type</entry>
1874 <entry>Description</entry>
1880 <entry><literal>table_catalog</literal></entry>
1881 <entry><type>sql_identifier</type></entry>
1883 Name of the database that contains the table that is used by
1884 some constraint (always the current database)
1889 <entry><literal>table_schema</literal></entry>
1890 <entry><type>sql_identifier</type></entry>
1892 Name of the schema that contains the table that is used by some
1898 <entry><literal>table_name</literal></entry>
1899 <entry><type>sql_identifier</type></entry>
1900 <entry>Name of the table that is used by some constraint</entry>
1904 <entry><literal>constraint_catalog</literal></entry>
1905 <entry><type>sql_identifier</type></entry>
1906 <entry>Name of the database that contains the constraint (always the current database)</entry>
1910 <entry><literal>constraint_schema</literal></entry>
1911 <entry><type>sql_identifier</type></entry>
1912 <entry>Name of the schema that contains the constraint</entry>
1916 <entry><literal>constraint_name</literal></entry>
1917 <entry><type>sql_identifier</type></entry>
1918 <entry>Name of the constraint</entry>
1925 <sect1 id="infoschema-data-type-privileges">
1926 <title><literal>data_type_privileges</literal></title>
1929 The view <literal>data_type_privileges</literal> identifies all
1930 data type descriptors that the current user has access to, by way
1931 of being the owner of the described object or having some privilege
1932 for it. A data type descriptor is generated whenever a data type
1933 is used in the definition of a table column, a domain, or a
1934 function (as parameter or return type) and stores some information
1935 about how the data type is used in that instance (for example, the
1936 declared maximum length, if applicable). Each data type
1937 descriptor is assigned an arbitrary identifier that is unique
1938 among the data type descriptor identifiers assigned for one object
1939 (table, domain, function). This view is probably not useful for
1940 applications, but it is used to define some other views in the
1945 <title><literal>data_type_privileges</literal> Columns</title>
1951 <entry>Data Type</entry>
1952 <entry>Description</entry>
1958 <entry><literal>object_catalog</literal></entry>
1959 <entry><type>sql_identifier</type></entry>
1960 <entry>Name of the database that contains the described object (always the current database)</entry>
1964 <entry><literal>object_schema</literal></entry>
1965 <entry><type>sql_identifier</type></entry>
1966 <entry>Name of the schema that contains the described object</entry>
1970 <entry><literal>object_name</literal></entry>
1971 <entry><type>sql_identifier</type></entry>
1972 <entry>Name of the described object</entry>
1976 <entry><literal>object_type</literal></entry>
1977 <entry><type>character_data</type></entry>
1979 The type of the described object: one of
1980 <literal>TABLE</literal> (the data type descriptor pertains to
1981 a column of that table), <literal>DOMAIN</literal> (the data
1982 type descriptors pertains to that domain),
1983 <literal>ROUTINE</literal> (the data type descriptor pertains
1984 to a parameter or the return data type of that function).
1989 <entry><literal>dtd_identifier</literal></entry>
1990 <entry><type>sql_identifier</type></entry>
1992 The identifier of the data type descriptor, which is unique
1993 among the data type descriptors for that same object.
2001 <sect1 id="infoschema-domain-constraints">
2002 <title><literal>domain_constraints</literal></title>
2005 The view <literal>domain_constraints</literal> contains all constraints
2006 belonging to domains defined in the current database. Only those domains
2007 are shown that the current user has access to (by way of being the owner or
2008 having some privilege).
2012 <title><literal>domain_constraints</literal> Columns</title>
2018 <entry>Data Type</entry>
2019 <entry>Description</entry>
2025 <entry><literal>constraint_catalog</literal></entry>
2026 <entry><type>sql_identifier</type></entry>
2027 <entry>Name of the database that contains the constraint (always the current database)</entry>
2031 <entry><literal>constraint_schema</literal></entry>
2032 <entry><type>sql_identifier</type></entry>
2033 <entry>Name of the schema that contains the constraint</entry>
2037 <entry><literal>constraint_name</literal></entry>
2038 <entry><type>sql_identifier</type></entry>
2039 <entry>Name of the constraint</entry>
2043 <entry><literal>domain_catalog</literal></entry>
2044 <entry><type>sql_identifier</type></entry>
2045 <entry>Name of the database that contains the domain (always the current database)</entry>
2049 <entry><literal>domain_schema</literal></entry>
2050 <entry><type>sql_identifier</type></entry>
2051 <entry>Name of the schema that contains the domain</entry>
2055 <entry><literal>domain_name</literal></entry>
2056 <entry><type>sql_identifier</type></entry>
2057 <entry>Name of the domain</entry>
2061 <entry><literal>is_deferrable</literal></entry>
2062 <entry><type>yes_or_no</type></entry>
2063 <entry><literal>YES</literal> if the constraint is deferrable, <literal>NO</literal> if not</entry>
2067 <entry><literal>initially_deferred</literal></entry>
2068 <entry><type>yes_or_no</type></entry>
2069 <entry><literal>YES</literal> if the constraint is deferrable and initially deferred, <literal>NO</literal> if not</entry>
2076 <sect1 id="infoschema-domain-udt-usage">
2077 <title><literal>domain_udt_usage</literal></title>
2080 The view <literal>domain_udt_usage</literal> identifies all domains
2081 that are based on data types owned by a currently enabled role.
2082 Note that in <productname>PostgreSQL</productname>, built-in data
2083 types behave like user-defined types, so they are included here as
2088 <title><literal>domain_udt_usage</literal> Columns</title>
2094 <entry>Data Type</entry>
2095 <entry>Description</entry>
2101 <entry><literal>udt_catalog</literal></entry>
2102 <entry><type>sql_identifier</type></entry>
2103 <entry>Name of the database that the domain data type is defined in (always the current database)</entry>
2107 <entry><literal>udt_schema</literal></entry>
2108 <entry><type>sql_identifier</type></entry>
2109 <entry>Name of the schema that the domain data type is defined in</entry>
2113 <entry><literal>udt_name</literal></entry>
2114 <entry><type>sql_identifier</type></entry>
2115 <entry>Name of the domain data type</entry>
2119 <entry><literal>domain_catalog</literal></entry>
2120 <entry><type>sql_identifier</type></entry>
2121 <entry>Name of the database that contains the domain (always the current database)</entry>
2125 <entry><literal>domain_schema</literal></entry>
2126 <entry><type>sql_identifier</type></entry>
2127 <entry>Name of the schema that contains the domain</entry>
2131 <entry><literal>domain_name</literal></entry>
2132 <entry><type>sql_identifier</type></entry>
2133 <entry>Name of the domain</entry>
2140 <sect1 id="infoschema-domains">
2141 <title><literal>domains</literal></title>
2144 The view <literal>domains</literal> contains all domains defined in the
2145 current database. Only those domains are shown that the current user has
2146 access to (by way of being the owner or having some privilege).
2150 <title><literal>domains</literal> Columns</title>
2156 <entry>Data Type</entry>
2157 <entry>Description</entry>
2163 <entry><literal>domain_catalog</literal></entry>
2164 <entry><type>sql_identifier</type></entry>
2165 <entry>Name of the database that contains the domain (always the current database)</entry>
2169 <entry><literal>domain_schema</literal></entry>
2170 <entry><type>sql_identifier</type></entry>
2171 <entry>Name of the schema that contains the domain</entry>
2175 <entry><literal>domain_name</literal></entry>
2176 <entry><type>sql_identifier</type></entry>
2177 <entry>Name of the domain</entry>
2181 <entry><literal>data_type</literal></entry>
2182 <entry><type>character_data</type></entry>
2184 Data type of the domain, if it is a built-in type, or
2185 <literal>ARRAY</literal> if it is some array (in that case, see
2186 the view <literal>element_types</literal>), else
2187 <literal>USER-DEFINED</literal> (in that case, the type is
2188 identified in <literal>udt_name</literal> and associated
2194 <entry><literal>character_maximum_length</literal></entry>
2195 <entry><type>cardinal_number</type></entry>
2197 If the domain has a character or bit string type, the declared
2198 maximum length; null for all other data types or if no maximum
2199 length was declared.
2204 <entry><literal>character_octet_length</literal></entry>
2205 <entry><type>cardinal_number</type></entry>
2207 If the domain has a character type, the maximum possible length
2208 in octets (bytes) of a datum; null for all other data types.
2209 The maximum octet length depends on the declared character
2210 maximum length (see above) and the server encoding.
2215 <entry><literal>character_set_catalog</literal></entry>
2216 <entry><type>sql_identifier</type></entry>
2217 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
2221 <entry><literal>character_set_schema</literal></entry>
2222 <entry><type>sql_identifier</type></entry>
2223 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
2227 <entry><literal>character_set_name</literal></entry>
2228 <entry><type>sql_identifier</type></entry>
2229 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
2233 <entry><literal>collation_catalog</literal></entry>
2234 <entry><type>sql_identifier</type></entry>
2236 Name of the database containing the collation of the domain
2237 (always the current database), null if default or the data type
2238 of the domain is not collatable
2243 <entry><literal>collation_schema</literal></entry>
2244 <entry><type>sql_identifier</type></entry>
2246 Name of the schema containing the collation of the domain, null
2247 if default or the data type of the domain is not collatable
2252 <entry><literal>collation_name</literal></entry>
2253 <entry><type>sql_identifier</type></entry>
2255 Name of the collation of the domain, null if default or the
2256 data type of the domain is not collatable
2261 <entry><literal>numeric_precision</literal></entry>
2262 <entry><type>cardinal_number</type></entry>
2264 If the domain has a numeric type, this column contains the
2265 (declared or implicit) precision of the type for this domain.
2266 The precision indicates the number of significant digits. It
2267 can be expressed in decimal (base 10) or binary (base 2) terms,
2268 as specified in the column
2269 <literal>numeric_precision_radix</literal>. For all other data
2270 types, this column is null.
2275 <entry><literal>numeric_precision_radix</literal></entry>
2276 <entry><type>cardinal_number</type></entry>
2278 If the domain has a numeric type, this column indicates in
2279 which base the values in the columns
2280 <literal>numeric_precision</literal> and
2281 <literal>numeric_scale</literal> are expressed. The value is
2282 either 2 or 10. For all other data types, this column is null.
2287 <entry><literal>numeric_scale</literal></entry>
2288 <entry><type>cardinal_number</type></entry>
2290 If the domain has an exact numeric type, this column contains
2291 the (declared or implicit) scale of the type for this domain.
2292 The scale indicates the number of significant digits to the
2293 right of the decimal point. It can be expressed in decimal
2294 (base 10) or binary (base 2) terms, as specified in the column
2295 <literal>numeric_precision_radix</literal>. For all other data
2296 types, this column is null.
2301 <entry><literal>datetime_precision</literal></entry>
2302 <entry><type>cardinal_number</type></entry>
2304 If <literal>data_type</literal> identifies a date, time,
2305 timestamp, or interval type, this column contains the (declared
2306 or implicit) fractional seconds precision of the type for this
2307 domain, that is, the number of decimal digits maintained
2308 following the decimal point in the seconds value. For all
2309 other data types, this column is null.
2314 <entry><literal>interval_type</literal></entry>
2315 <entry><type>character_data</type></entry>
2317 If <literal>data_type</literal> identifies an interval type,
2318 this column contains the specification which fields the
2319 intervals include for this domain, e.g., <literal>YEAR TO
2320 MONTH</literal>, <literal>DAY TO SECOND</literal>, etc. If no
2321 field restrictions were specified (that is, the interval
2322 accepts all fields), and for all other data types, this field
2328 <entry><literal>interval_precision</literal></entry>
2329 <entry><type>cardinal_number</type></entry>
2331 Applies to a feature not available
2332 in <productname>PostgreSQL</productname>
2333 (see <literal>datetime_precision</literal> for the fractional
2334 seconds precision of interval type domains)
2339 <entry><literal>domain_default</literal></entry>
2340 <entry><type>character_data</type></entry>
2341 <entry>Default expression of the domain</entry>
2345 <entry><literal>udt_catalog</literal></entry>
2346 <entry><type>sql_identifier</type></entry>
2347 <entry>Name of the database that the domain data type is defined in (always the current database)</entry>
2351 <entry><literal>udt_schema</literal></entry>
2352 <entry><type>sql_identifier</type></entry>
2353 <entry>Name of the schema that the domain data type is defined in</entry>
2357 <entry><literal>udt_name</literal></entry>
2358 <entry><type>sql_identifier</type></entry>
2359 <entry>Name of the domain data type</entry>
2363 <entry><literal>scope_catalog</literal></entry>
2364 <entry><type>sql_identifier</type></entry>
2365 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
2369 <entry><literal>scope_schema</literal></entry>
2370 <entry><type>sql_identifier</type></entry>
2371 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
2375 <entry><literal>scope_name</literal></entry>
2376 <entry><type>sql_identifier</type></entry>
2377 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
2381 <entry><literal>maximum_cardinality</literal></entry>
2382 <entry><type>cardinal_number</type></entry>
2383 <entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</productname></entry>
2387 <entry><literal>dtd_identifier</literal></entry>
2388 <entry><type>sql_identifier</type></entry>
2390 An identifier of the data type descriptor of the domain, unique
2391 among the data type descriptors pertaining to the domain (which
2392 is trivial, because a domain only contains one data type
2393 descriptor). This is mainly useful for joining with other
2394 instances of such identifiers. (The specific format of the
2395 identifier is not defined and not guaranteed to remain the same
2396 in future versions.)
2404 <sect1 id="infoschema-element-types">
2405 <title><literal>element_types</literal></title>
2408 The view <literal>element_types</literal> contains the data type
2409 descriptors of the elements of arrays. When a table column, composite-type attribute,
2410 domain, function parameter, or function return value is defined to
2411 be of an array type, the respective information schema view only
2412 contains <literal>ARRAY</literal> in the column
2413 <literal>data_type</literal>. To obtain information on the element
2414 type of the array, you can join the respective view with this view.
2415 For example, to show the columns of a table with data types and
2416 array element types, if applicable, you could do:
2418 SELECT c.column_name, c.data_type, e.data_type AS element_type
2419 FROM information_schema.columns c LEFT JOIN information_schema.element_types e
2420 ON ((c.table_catalog, c.table_schema, c.table_name, 'TABLE', c.dtd_identifier)
2421 = (e.object_catalog, e.object_schema, e.object_name, e.object_type, e.collection_type_identifier))
2422 WHERE c.table_schema = '...' AND c.table_name = '...'
2423 ORDER BY c.ordinal_position;
2425 This view only includes objects that the current user has access
2426 to, by way of being the owner or having some privilege.
2430 <title><literal>element_types</literal> Columns</title>
2436 <entry>Data Type</entry>
2437 <entry>Description</entry>
2443 <entry><literal>object_catalog</literal></entry>
2444 <entry><type>sql_identifier</type></entry>
2446 Name of the database that contains the object that uses the
2447 array being described (always the current database)
2452 <entry><literal>object_schema</literal></entry>
2453 <entry><type>sql_identifier</type></entry>
2455 Name of the schema that contains the object that uses the array
2461 <entry><literal>object_name</literal></entry>
2462 <entry><type>sql_identifier</type></entry>
2464 Name of the object that uses the array being described
2469 <entry><literal>object_type</literal></entry>
2470 <entry><type>character_data</type></entry>
2472 The type of the object that uses the array being described: one
2473 of <literal>TABLE</literal> (the array is used by a column of
2474 that table), <literal>USER-DEFINED TYPE</literal> (the array is
2475 used by an attribute of that composite type),
2476 <literal>DOMAIN</literal> (the array is used by that domain),
2477 <literal>ROUTINE</literal> (the array is used by a parameter or
2478 the return data type of that function).
2483 <entry><literal>collection_type_identifier</literal></entry>
2484 <entry><type>sql_identifier</type></entry>
2486 The identifier of the data type descriptor of the array being
2487 described. Use this to join with the
2488 <literal>dtd_identifier</literal> columns of other information
2494 <entry><literal>data_type</literal></entry>
2495 <entry><type>character_data</type></entry>
2497 Data type of the array elements, if it is a built-in type, else
2498 <literal>USER-DEFINED</literal> (in that case, the type is
2499 identified in <literal>udt_name</literal> and associated
2505 <entry><literal>character_maximum_length</literal></entry>
2506 <entry><type>cardinal_number</type></entry>
2507 <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname></entry>
2511 <entry><literal>character_octet_length</literal></entry>
2512 <entry><type>cardinal_number</type></entry>
2513 <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname></entry>
2517 <entry><literal>character_set_catalog</literal></entry>
2518 <entry><type>sql_identifier</type></entry>
2519 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
2523 <entry><literal>character_set_schema</literal></entry>
2524 <entry><type>sql_identifier</type></entry>
2525 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
2529 <entry><literal>character_set_name</literal></entry>
2530 <entry><type>sql_identifier</type></entry>
2531 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
2535 <entry><literal>collation_catalog</literal></entry>
2536 <entry><type>sql_identifier</type></entry>
2538 Name of the database containing the collation of the element
2539 type (always the current database), null if default or the data
2540 type of the element is not collatable
2545 <entry><literal>collation_schema</literal></entry>
2546 <entry><type>sql_identifier</type></entry>
2548 Name of the schema containing the collation of the element
2549 type, null if default or the data type of the element is not
2555 <entry><literal>collation_name</literal></entry>
2556 <entry><type>sql_identifier</type></entry>
2558 Name of the collation of the element type, null if default or
2559 the data type of the element is not collatable
2564 <entry><literal>numeric_precision</literal></entry>
2565 <entry><type>cardinal_number</type></entry>
2566 <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname></entry>
2570 <entry><literal>numeric_precision_radix</literal></entry>
2571 <entry><type>cardinal_number</type></entry>
2572 <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname></entry>
2576 <entry><literal>numeric_scale</literal></entry>
2577 <entry><type>cardinal_number</type></entry>
2578 <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname></entry>
2582 <entry><literal>datetime_precision</literal></entry>
2583 <entry><type>cardinal_number</type></entry>
2584 <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname></entry>
2588 <entry><literal>interval_type</literal></entry>
2589 <entry><type>character_data</type></entry>
2590 <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname></entry>
2594 <entry><literal>interval_precision</literal></entry>
2595 <entry><type>cardinal_number</type></entry>
2596 <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</productname></entry>
2600 <entry><literal>domain_default</literal></entry>
2601 <entry><type>character_data</type></entry>
2602 <entry>Not yet implemented</entry>
2606 <entry><literal>udt_catalog</literal></entry>
2607 <entry><type>sql_identifier</type></entry>
2609 Name of the database that the data type of the elements is
2610 defined in (always the current database)
2615 <entry><literal>udt_schema</literal></entry>
2616 <entry><type>sql_identifier</type></entry>
2618 Name of the schema that the data type of the elements is
2624 <entry><literal>udt_name</literal></entry>
2625 <entry><type>sql_identifier</type></entry>
2627 Name of the data type of the elements
2632 <entry><literal>scope_catalog</literal></entry>
2633 <entry><type>sql_identifier</type></entry>
2634 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
2638 <entry><literal>scope_schema</literal></entry>
2639 <entry><type>sql_identifier</type></entry>
2640 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
2644 <entry><literal>scope_name</literal></entry>
2645 <entry><type>sql_identifier</type></entry>
2646 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
2650 <entry><literal>maximum_cardinality</literal></entry>
2651 <entry><type>cardinal_number</type></entry>
2652 <entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</productname></entry>
2656 <entry><literal>dtd_identifier</literal></entry>
2657 <entry><type>sql_identifier</type></entry>
2659 An identifier of the data type descriptor of the element. This
2660 is currently not useful.
2668 <sect1 id="infoschema-enabled-roles">
2669 <title><literal>enabled_roles</literal></title>
2672 The view <literal>enabled_roles</literal> identifies the currently
2673 <quote>enabled roles</quote>. The enabled roles are recursively
2674 defined as the current user together with all roles that have been
2675 granted to the enabled roles with automatic inheritance. In other
2676 words, these are all roles that the current user has direct or
2677 indirect, automatically inheriting membership in.
2678 <indexterm><primary>enabled role</primary></indexterm>
2679 <indexterm><primary>role</primary><secondary>enabled</secondary></indexterm>
2683 For permission checking, the set of <quote>applicable roles</quote>
2684 is applied, which can be broader than the set of enabled roles. So
2685 generally, it is better to use the view
2686 <literal>applicable_roles</literal> instead of this one; See
2687 <xref linkend="infoschema-applicable-roles"/> for details on
2688 <literal>applicable_roles</literal> view.
2692 <title><literal>enabled_roles</literal> Columns</title>
2698 <entry>Data Type</entry>
2699 <entry>Description</entry>
2705 <entry><literal>role_name</literal></entry>
2706 <entry><type>sql_identifier</type></entry>
2707 <entry>Name of a role</entry>
2714 <sect1 id="infoschema-foreign-data-wrapper-options">
2715 <title><literal>foreign_data_wrapper_options</literal></title>
2718 The view <literal>foreign_data_wrapper_options</literal> contains
2719 all the options defined for foreign-data wrappers in the current
2720 database. Only those foreign-data wrappers are shown that the
2721 current user has access to (by way of being the owner or having
2726 <title><literal>foreign_data_wrapper_options</literal> Columns</title>
2732 <entry>Data Type</entry>
2733 <entry>Description</entry>
2739 <entry><literal>foreign_data_wrapper_catalog</literal></entry>
2740 <entry><type>sql_identifier</type></entry>
2741 <entry>Name of the database that the foreign-data wrapper is defined in (always the current database)</entry>
2745 <entry><literal>foreign_data_wrapper_name</literal></entry>
2746 <entry><type>sql_identifier</type></entry>
2747 <entry>Name of the foreign-data wrapper</entry>
2751 <entry><literal>option_name</literal></entry>
2752 <entry><type>sql_identifier</type></entry>
2753 <entry>Name of an option</entry>
2757 <entry><literal>option_value</literal></entry>
2758 <entry><type>character_data</type></entry>
2759 <entry>Value of the option</entry>
2766 <sect1 id="infoschema-foreign-data-wrappers">
2767 <title><literal>foreign_data_wrappers</literal></title>
2770 The view <literal>foreign_data_wrappers</literal> contains all
2771 foreign-data wrappers defined in the current database. Only those
2772 foreign-data wrappers are shown that the current user has access to
2773 (by way of being the owner or having some privilege).
2777 <title><literal>foreign_data_wrappers</literal> Columns</title>
2783 <entry>Data Type</entry>
2784 <entry>Description</entry>
2790 <entry><literal>foreign_data_wrapper_catalog</literal></entry>
2791 <entry><type>sql_identifier</type></entry>
2792 <entry>Name of the database that contains the foreign-data
2793 wrapper (always the current database)</entry>
2797 <entry><literal>foreign_data_wrapper_name</literal></entry>
2798 <entry><type>sql_identifier</type></entry>
2799 <entry>Name of the foreign-data wrapper</entry>
2803 <entry><literal>authorization_identifier</literal></entry>
2804 <entry><type>sql_identifier</type></entry>
2805 <entry>Name of the owner of the foreign server</entry>
2809 <entry><literal>library_name</literal></entry>
2810 <entry><type>character_data</type></entry>
2811 <entry>File name of the library that implementing this foreign-data wrapper</entry>
2815 <entry><literal>foreign_data_wrapper_language</literal></entry>
2816 <entry><type>character_data</type></entry>
2817 <entry>Language used to implement this foreign-data wrapper</entry>
2824 <sect1 id="infoschema-foreign-server-options">
2825 <title><literal>foreign_server_options</literal></title>
2828 The view <literal>foreign_server_options</literal> contains all the
2829 options defined for foreign servers in the current database. Only
2830 those foreign servers are shown that the current user has access to
2831 (by way of being the owner or having some privilege).
2835 <title><literal>foreign_server_options</literal> Columns</title>
2841 <entry>Data Type</entry>
2842 <entry>Description</entry>
2848 <entry><literal>foreign_server_catalog</literal></entry>
2849 <entry><type>sql_identifier</type></entry>
2850 <entry>Name of the database that the foreign server is defined in (always the current database)</entry>
2854 <entry><literal>foreign_server_name</literal></entry>
2855 <entry><type>sql_identifier</type></entry>
2856 <entry>Name of the foreign server</entry>
2860 <entry><literal>option_name</literal></entry>
2861 <entry><type>sql_identifier</type></entry>
2862 <entry>Name of an option</entry>
2866 <entry><literal>option_value</literal></entry>
2867 <entry><type>character_data</type></entry>
2868 <entry>Value of the option</entry>
2875 <sect1 id="infoschema-foreign-servers">
2876 <title><literal>foreign_servers</literal></title>
2879 The view <literal>foreign_servers</literal> contains all foreign
2880 servers defined in the current database. Only those foreign
2881 servers are shown that the current user has access to (by way of
2882 being the owner or having some privilege).
2886 <title><literal>foreign_servers</literal> Columns</title>
2892 <entry>Data Type</entry>
2893 <entry>Description</entry>
2899 <entry><literal>foreign_server_catalog</literal></entry>
2900 <entry><type>sql_identifier</type></entry>
2901 <entry>Name of the database that the foreign server is defined in (always the current database)</entry>
2905 <entry><literal>foreign_server_name</literal></entry>
2906 <entry><type>sql_identifier</type></entry>
2907 <entry>Name of the foreign server</entry>
2911 <entry><literal>foreign_data_wrapper_catalog</literal></entry>
2912 <entry><type>sql_identifier</type></entry>
2913 <entry>Name of the database that contains the foreign-data
2914 wrapper used by the foreign server (always the current database)</entry>
2918 <entry><literal>foreign_data_wrapper_name</literal></entry>
2919 <entry><type>sql_identifier</type></entry>
2920 <entry>Name of the foreign-data wrapper used by the foreign server</entry>
2924 <entry><literal>foreign_server_type</literal></entry>
2925 <entry><type>character_data</type></entry>
2926 <entry>Foreign server type information, if specified upon creation</entry>
2930 <entry><literal>foreign_server_version</literal></entry>
2931 <entry><type>character_data</type></entry>
2932 <entry>Foreign server version information, if specified upon creation</entry>
2936 <entry><literal>authorization_identifier</literal></entry>
2937 <entry><type>sql_identifier</type></entry>
2938 <entry>Name of the owner of the foreign server</entry>
2945 <sect1 id="infoschema-foreign-table-options">
2946 <title><literal>foreign_table_options</literal></title>
2949 The view <literal>foreign_table_options</literal> contains all the
2950 options defined for foreign tables in the current database. Only
2951 those foreign tables are shown that the current user has access to
2952 (by way of being the owner or having some privilege).
2956 <title><literal>foreign_table_options</literal> Columns</title>
2962 <entry>Data Type</entry>
2963 <entry>Description</entry>
2969 <entry><literal>foreign_table_catalog</literal></entry>
2970 <entry><type>sql_identifier</type></entry>
2971 <entry>Name of the database that contains the foreign table (always the current database)</entry>
2975 <entry><literal>foreign_table_schema</literal></entry>
2976 <entry><type>sql_identifier</type></entry>
2977 <entry>Name of the schema that contains the foreign table</entry>
2981 <entry><literal>foreign_table_name</literal></entry>
2982 <entry><type>sql_identifier</type></entry>
2983 <entry>Name of the foreign table</entry>
2987 <entry><literal>option_name</literal></entry>
2988 <entry><type>sql_identifier</type></entry>
2989 <entry>Name of an option</entry>
2993 <entry><literal>option_value</literal></entry>
2994 <entry><type>character_data</type></entry>
2995 <entry>Value of the option</entry>
3002 <sect1 id="infoschema-foreign-tables">
3003 <title><literal>foreign_tables</literal></title>
3006 The view <literal>foreign_tables</literal> contains all foreign
3007 tables defined in the current database. Only those foreign
3008 tables are shown that the current user has access to (by way of
3009 being the owner or having some privilege).
3013 <title><literal>foreign_tables</literal> Columns</title>
3019 <entry>Data Type</entry>
3020 <entry>Description</entry>
3026 <entry><literal>foreign_table_catalog</literal></entry>
3027 <entry><type>sql_identifier</type></entry>
3028 <entry>Name of the database that the foreign table is defined in (always the current database)</entry>
3032 <entry><literal>foreign_table_schema</literal></entry>
3033 <entry><type>sql_identifier</type></entry>
3034 <entry>Name of the schema that contains the foreign table</entry>
3038 <entry><literal>foreign_table_name</literal></entry>
3039 <entry><type>sql_identifier</type></entry>
3040 <entry>Name of the foreign table</entry>
3044 <entry><literal>foreign_server_catalog</literal></entry>
3045 <entry><type>sql_identifier</type></entry>
3046 <entry>Name of the database that the foreign server is defined in (always the current database)</entry>
3050 <entry><literal>foreign_server_name</literal></entry>
3051 <entry><type>sql_identifier</type></entry>
3052 <entry>Name of the foreign server</entry>
3059 <sect1 id="infoschema-key-column-usage">
3060 <title><literal>key_column_usage</literal></title>
3063 The view <literal>key_column_usage</literal> identifies all columns
3064 in the current database that are restricted by some unique, primary
3065 key, or foreign key constraint. Check constraints are not included
3066 in this view. Only those columns are shown that the current user
3067 has access to, by way of being the owner or having some privilege.
3071 <title><literal>key_column_usage</literal> Columns</title>
3077 <entry>Data Type</entry>
3078 <entry>Description</entry>
3084 <entry><literal>constraint_catalog</literal></entry>
3085 <entry><type>sql_identifier</type></entry>
3086 <entry>Name of the database that contains the constraint (always the current database)</entry>
3090 <entry><literal>constraint_schema</literal></entry>
3091 <entry><type>sql_identifier</type></entry>
3092 <entry>Name of the schema that contains the constraint</entry>
3096 <entry><literal>constraint_name</literal></entry>
3097 <entry><type>sql_identifier</type></entry>
3098 <entry>Name of the constraint</entry>
3102 <entry><literal>table_catalog</literal></entry>
3103 <entry><type>sql_identifier</type></entry>
3105 Name of the database that contains the table that contains the
3106 column that is restricted by this constraint (always the
3112 <entry><literal>table_schema</literal></entry>
3113 <entry><type>sql_identifier</type></entry>
3115 Name of the schema that contains the table that contains the
3116 column that is restricted by this constraint
3121 <entry><literal>table_name</literal></entry>
3122 <entry><type>sql_identifier</type></entry>
3124 Name of the table that contains the column that is restricted
3130 <entry><literal>column_name</literal></entry>
3131 <entry><type>sql_identifier</type></entry>
3133 Name of the column that is restricted by this constraint
3138 <entry><literal>ordinal_position</literal></entry>
3139 <entry><type>cardinal_number</type></entry>
3141 Ordinal position of the column within the constraint key (count
3147 <entry><literal>position_in_unique_constraint</literal></entry>
3148 <entry><type>cardinal_number</type></entry>
3150 For a foreign-key constraint, ordinal position of the referenced
3151 column within its unique constraint (count starts at 1);
3160 <sect1 id="infoschema-parameters">
3161 <title><literal>parameters</literal></title>
3164 The view <literal>parameters</literal> contains information about
3165 the parameters (arguments) of all functions in the current database.
3166 Only those functions are shown that the current user has access to
3167 (by way of being the owner or having some privilege).
3171 <title><literal>parameters</literal> Columns</title>
3177 <entry>Data Type</entry>
3178 <entry>Description</entry>
3184 <entry><literal>specific_catalog</literal></entry>
3185 <entry><type>sql_identifier</type></entry>
3186 <entry>Name of the database containing the function (always the current database)</entry>
3190 <entry><literal>specific_schema</literal></entry>
3191 <entry><type>sql_identifier</type></entry>
3192 <entry>Name of the schema containing the function</entry>
3196 <entry><literal>specific_name</literal></entry>
3197 <entry><type>sql_identifier</type></entry>
3199 The <quote>specific name</quote> of the function. See <xref
3200 linkend="infoschema-routines"/> for more information.
3205 <entry><literal>ordinal_position</literal></entry>
3206 <entry><type>cardinal_number</type></entry>
3208 Ordinal position of the parameter in the argument list of the
3209 function (count starts at 1)
3214 <entry><literal>parameter_mode</literal></entry>
3215 <entry><type>character_data</type></entry>
3217 <literal>IN</literal> for input parameter,
3218 <literal>OUT</literal> for output parameter,
3219 and <literal>INOUT</literal> for input/output parameter.
3224 <entry><literal>is_result</literal></entry>
3225 <entry><type>yes_or_no</type></entry>
3226 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
3230 <entry><literal>as_locator</literal></entry>
3231 <entry><type>yes_or_no</type></entry>
3232 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
3236 <entry><literal>parameter_name</literal></entry>
3237 <entry><type>sql_identifier</type></entry>
3238 <entry>Name of the parameter, or null if the parameter has no name</entry>
3242 <entry><literal>data_type</literal></entry>
3243 <entry><type>character_data</type></entry>
3245 Data type of the parameter, if it is a built-in type, or
3246 <literal>ARRAY</literal> if it is some array (in that case, see
3247 the view <literal>element_types</literal>), else
3248 <literal>USER-DEFINED</literal> (in that case, the type is
3249 identified in <literal>udt_name</literal> and associated
3255 <entry><literal>character_maximum_length</literal></entry>
3256 <entry><type>cardinal_number</type></entry>
3257 <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry>
3261 <entry><literal>character_octet_length</literal></entry>
3262 <entry><type>cardinal_number</type></entry>
3263 <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry>
3267 <entry><literal>character_set_catalog</literal></entry>
3268 <entry><type>sql_identifier</type></entry>
3269 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
3273 <entry><literal>character_set_schema</literal></entry>
3274 <entry><type>sql_identifier</type></entry>
3275 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
3279 <entry><literal>character_set_name</literal></entry>
3280 <entry><type>sql_identifier</type></entry>
3281 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
3285 <entry><literal>collation_catalog</literal></entry>
3286 <entry><type>sql_identifier</type></entry>
3287 <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry>
3291 <entry><literal>collation_schema</literal></entry>
3292 <entry><type>sql_identifier</type></entry>
3293 <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry>
3297 <entry><literal>collation_name</literal></entry>
3298 <entry><type>sql_identifier</type></entry>
3299 <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry>
3303 <entry><literal>numeric_precision</literal></entry>
3304 <entry><type>cardinal_number</type></entry>
3305 <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry>
3309 <entry><literal>numeric_precision_radix</literal></entry>
3310 <entry><type>cardinal_number</type></entry>
3311 <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry>
3315 <entry><literal>numeric_scale</literal></entry>
3316 <entry><type>cardinal_number</type></entry>
3317 <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry>
3321 <entry><literal>datetime_precision</literal></entry>
3322 <entry><type>cardinal_number</type></entry>
3323 <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry>
3327 <entry><literal>interval_type</literal></entry>
3328 <entry><type>character_data</type></entry>
3329 <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry>
3333 <entry><literal>interval_precision</literal></entry>
3334 <entry><type>cardinal_number</type></entry>
3335 <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</productname></entry>
3339 <entry><literal>udt_catalog</literal></entry>
3340 <entry><type>sql_identifier</type></entry>
3342 Name of the database that the data type of the parameter is
3343 defined in (always the current database)
3348 <entry><literal>udt_schema</literal></entry>
3349 <entry><type>sql_identifier</type></entry>
3351 Name of the schema that the data type of the parameter is
3357 <entry><literal>udt_name</literal></entry>
3358 <entry><type>sql_identifier</type></entry>
3360 Name of the data type of the parameter
3365 <entry><literal>scope_catalog</literal></entry>
3366 <entry><type>sql_identifier</type></entry>
3367 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
3371 <entry><literal>scope_schema</literal></entry>
3372 <entry><type>sql_identifier</type></entry>
3373 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
3377 <entry><literal>scope_name</literal></entry>
3378 <entry><type>sql_identifier</type></entry>
3379 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
3383 <entry><literal>maximum_cardinality</literal></entry>
3384 <entry><type>cardinal_number</type></entry>
3385 <entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</productname></entry>
3389 <entry><literal>dtd_identifier</literal></entry>
3390 <entry><type>sql_identifier</type></entry>
3392 An identifier of the data type descriptor of the parameter,
3393 unique among the data type descriptors pertaining to the
3394 function. This is mainly useful for joining with other
3395 instances of such identifiers. (The specific format of the
3396 identifier is not defined and not guaranteed to remain the same
3397 in future versions.)
3402 <entry><literal>parameter_default</literal></entry>
3403 <entry><type>character_data</type></entry>
3405 The default expression of the parameter, or null if none or if the
3406 function is not owned by a currently enabled role.
3414 <sect1 id="infoschema-referential-constraints">
3415 <title><literal>referential_constraints</literal></title>
3418 The view <literal>referential_constraints</literal> contains all
3419 referential (foreign key) constraints in the current database.
3420 Only those constraints are shown for which the current user has
3421 write access to the referencing table (by way of being the
3422 owner or having some privilege other than <literal>SELECT</literal>).
3426 <title><literal>referential_constraints</literal> Columns</title>
3432 <entry>Data Type</entry>
3433 <entry>Description</entry>
3439 <entry><literal>constraint_catalog</literal></entry>
3440 <entry><literal>sql_identifier</literal></entry>
3441 <entry>Name of the database containing the constraint (always the current database)</entry>
3445 <entry><literal>constraint_schema</literal></entry>
3446 <entry><literal>sql_identifier</literal></entry>
3447 <entry>Name of the schema containing the constraint</entry>
3451 <entry><literal>constraint_name</literal></entry>
3452 <entry><literal>sql_identifier</literal></entry>
3453 <entry>Name of the constraint</entry>
3457 <entry><literal>unique_constraint_catalog</literal></entry>
3458 <entry><literal>sql_identifier</literal></entry>
3460 Name of the database that contains the unique or primary key
3461 constraint that the foreign key constraint references (always
3462 the current database)
3467 <entry><literal>unique_constraint_schema</literal></entry>
3468 <entry><literal>sql_identifier</literal></entry>
3470 Name of the schema that contains the unique or primary key
3471 constraint that the foreign key constraint references
3476 <entry><literal>unique_constraint_name</literal></entry>
3477 <entry><literal>sql_identifier</literal></entry>
3479 Name of the unique or primary key constraint that the foreign
3480 key constraint references
3485 <entry><literal>match_option</literal></entry>
3486 <entry><literal>character_data</literal></entry>
3488 Match option of the foreign key constraint:
3489 <literal>FULL</literal>, <literal>PARTIAL</literal>, or
3490 <literal>NONE</literal>.
3495 <entry><literal>update_rule</literal></entry>
3496 <entry><literal>character_data</literal></entry>
3498 Update rule of the foreign key constraint:
3499 <literal>CASCADE</literal>, <literal>SET NULL</literal>,
3500 <literal>SET DEFAULT</literal>, <literal>RESTRICT</literal>, or
3501 <literal>NO ACTION</literal>.
3506 <entry><literal>delete_rule</literal></entry>
3507 <entry><literal>character_data</literal></entry>
3509 Delete rule of the foreign key constraint:
3510 <literal>CASCADE</literal>, <literal>SET NULL</literal>,
3511 <literal>SET DEFAULT</literal>, <literal>RESTRICT</literal>, or
3512 <literal>NO ACTION</literal>.
3521 <sect1 id="infoschema-role-column-grants">
3522 <title><literal>role_column_grants</literal></title>
3525 The view <literal>role_column_grants</literal> identifies all
3526 privileges granted on columns where the grantor or grantee is a
3527 currently enabled role. Further information can be found under
3528 <literal>column_privileges</literal>. The only effective
3529 difference between this view
3530 and <literal>column_privileges</literal> is that this view omits
3531 columns that have been made accessible to the current user by way
3532 of a grant to <literal>PUBLIC</literal>.
3536 <title><literal>role_column_grants</literal> Columns</title>
3542 <entry>Data Type</entry>
3543 <entry>Description</entry>
3549 <entry><literal>grantor</literal></entry>
3550 <entry><type>sql_identifier</type></entry>
3551 <entry>Name of the role that granted the privilege</entry>
3555 <entry><literal>grantee</literal></entry>
3556 <entry><type>sql_identifier</type></entry>
3557 <entry>Name of the role that the privilege was granted to</entry>
3561 <entry><literal>table_catalog</literal></entry>
3562 <entry><type>sql_identifier</type></entry>
3563 <entry>Name of the database that contains the table that contains the column (always the current database)</entry>
3567 <entry><literal>table_schema</literal></entry>
3568 <entry><type>sql_identifier</type></entry>
3569 <entry>Name of the schema that contains the table that contains the column</entry>
3573 <entry><literal>table_name</literal></entry>
3574 <entry><type>sql_identifier</type></entry>
3575 <entry>Name of the table that contains the column</entry>
3579 <entry><literal>column_name</literal></entry>
3580 <entry><type>sql_identifier</type></entry>
3581 <entry>Name of the column</entry>
3585 <entry><literal>privilege_type</literal></entry>
3586 <entry><type>character_data</type></entry>
3588 Type of the privilege: <literal>SELECT</literal>,
3589 <literal>INSERT</literal>, <literal>UPDATE</literal>, or
3590 <literal>REFERENCES</literal>
3595 <entry><literal>is_grantable</literal></entry>
3596 <entry><type>yes_or_no</type></entry>
3597 <entry><literal>YES</literal> if the privilege is grantable, <literal>NO</literal> if not</entry>
3604 <sect1 id="infoschema-role-routine-grants">
3605 <title><literal>role_routine_grants</literal></title>
3608 The view <literal>role_routine_grants</literal> identifies all
3609 privileges granted on functions where the grantor or grantee is a
3610 currently enabled role. Further information can be found under
3611 <literal>routine_privileges</literal>. The only effective
3612 difference between this view
3613 and <literal>routine_privileges</literal> is that this view omits
3614 functions that have been made accessible to the current user by way
3615 of a grant to <literal>PUBLIC</literal>.
3619 <title><literal>role_routine_grants</literal> Columns</title>
3625 <entry>Data Type</entry>
3626 <entry>Description</entry>
3632 <entry><literal>grantor</literal></entry>
3633 <entry><type>sql_identifier</type></entry>
3634 <entry>Name of the role that granted the privilege</entry>
3638 <entry><literal>grantee</literal></entry>
3639 <entry><type>sql_identifier</type></entry>
3640 <entry>Name of the role that the privilege was granted to</entry>
3644 <entry><literal>specific_catalog</literal></entry>
3645 <entry><type>sql_identifier</type></entry>
3646 <entry>Name of the database containing the function (always the current database)</entry>
3650 <entry><literal>specific_schema</literal></entry>
3651 <entry><type>sql_identifier</type></entry>
3652 <entry>Name of the schema containing the function</entry>
3656 <entry><literal>specific_name</literal></entry>
3657 <entry><type>sql_identifier</type></entry>
3659 The <quote>specific name</quote> of the function. See <xref
3660 linkend="infoschema-routines"/> for more information.
3665 <entry><literal>routine_catalog</literal></entry>
3666 <entry><type>sql_identifier</type></entry>
3667 <entry>Name of the database containing the function (always the current database)</entry>
3671 <entry><literal>routine_schema</literal></entry>
3672 <entry><type>sql_identifier</type></entry>
3673 <entry>Name of the schema containing the function</entry>
3677 <entry><literal>routine_name</literal></entry>
3678 <entry><type>sql_identifier</type></entry>
3679 <entry>Name of the function (might be duplicated in case of overloading)</entry>
3683 <entry><literal>privilege_type</literal></entry>
3684 <entry><type>character_data</type></entry>
3685 <entry>Always <literal>EXECUTE</literal> (the only privilege type for functions)</entry>
3689 <entry><literal>is_grantable</literal></entry>
3690 <entry><type>yes_or_no</type></entry>
3691 <entry><literal>YES</literal> if the privilege is grantable, <literal>NO</literal> if not</entry>
3698 <sect1 id="infoschema-role-table-grants">
3699 <title><literal>role_table_grants</literal></title>
3702 The view <literal>role_table_grants</literal> identifies all
3703 privileges granted on tables or views where the grantor or grantee
3704 is a currently enabled role. Further information can be found
3705 under <literal>table_privileges</literal>. The only effective
3706 difference between this view
3707 and <literal>table_privileges</literal> is that this view omits
3708 tables that have been made accessible to the current user by way of
3709 a grant to <literal>PUBLIC</literal>.
3713 <title><literal>role_table_grants</literal> Columns</title>
3719 <entry>Data Type</entry>
3720 <entry>Description</entry>
3726 <entry><literal>grantor</literal></entry>
3727 <entry><type>sql_identifier</type></entry>
3728 <entry>Name of the role that granted the privilege</entry>
3732 <entry><literal>grantee</literal></entry>
3733 <entry><type>sql_identifier</type></entry>
3734 <entry>Name of the role that the privilege was granted to</entry>
3738 <entry><literal>table_catalog</literal></entry>
3739 <entry><type>sql_identifier</type></entry>
3740 <entry>Name of the database that contains the table (always the current database)</entry>
3744 <entry><literal>table_schema</literal></entry>
3745 <entry><type>sql_identifier</type></entry>
3746 <entry>Name of the schema that contains the table</entry>
3750 <entry><literal>table_name</literal></entry>
3751 <entry><type>sql_identifier</type></entry>
3752 <entry>Name of the table</entry>
3756 <entry><literal>privilege_type</literal></entry>
3757 <entry><type>character_data</type></entry>
3759 Type of the privilege: <literal>SELECT</literal>,
3760 <literal>INSERT</literal>, <literal>UPDATE</literal>,
3761 <literal>DELETE</literal>, <literal>TRUNCATE</literal>,
3762 <literal>REFERENCES</literal>, or <literal>TRIGGER</literal>
3767 <entry><literal>is_grantable</literal></entry>
3768 <entry><type>yes_or_no</type></entry>
3769 <entry><literal>YES</literal> if the privilege is grantable, <literal>NO</literal> if not</entry>
3773 <entry><literal>with_hierarchy</literal></entry>
3774 <entry><type>yes_or_no</type></entry>
3776 In the SQL standard, <literal>WITH HIERARCHY OPTION</literal>
3777 is a separate (sub-)privilege allowing certain operations on
3778 table inheritance hierarchies. In PostgreSQL, this is included
3779 in the <literal>SELECT</literal> privilege, so this column
3780 shows <literal>YES</literal> if the privilege
3781 is <literal>SELECT</literal>, else <literal>NO</literal>.
3789 <sect1 id="infoschema-role-udt-grants">
3790 <title><literal>role_udt_grants</literal></title>
3793 The view <literal>role_udt_grants</literal> is intended to identify
3794 <literal>USAGE</literal> privileges granted on user-defined types
3795 where the grantor or grantee is a currently enabled role. Further
3796 information can be found under
3797 <literal>udt_privileges</literal>. The only effective difference
3798 between this view and <literal>udt_privileges</literal> is that
3799 this view omits objects that have been made accessible to the
3800 current user by way of a grant to <literal>PUBLIC</literal>. Since
3801 data types do not have real privileges in PostgreSQL, but only an
3802 implicit grant to <literal>PUBLIC</literal>, this view is empty.
3806 <title><literal>role_udt_grants</literal> Columns</title>
3812 <entry>Data Type</entry>
3813 <entry>Description</entry>
3819 <entry><literal>grantor</literal></entry>
3820 <entry><type>sql_identifier</type></entry>
3821 <entry>The name of the role that granted the privilege</entry>
3825 <entry><literal>grantee</literal></entry>
3826 <entry><type>sql_identifier</type></entry>
3827 <entry>The name of the role that the privilege was granted to</entry>
3831 <entry><literal>udt_catalog</literal></entry>
3832 <entry><type>sql_identifier</type></entry>
3833 <entry>Name of the database containing the type (always the current database)</entry>
3837 <entry><literal>udt_schema</literal></entry>
3838 <entry><type>sql_identifier</type></entry>
3839 <entry>Name of the schema containing the type</entry>
3843 <entry><literal>udt_name</literal></entry>
3844 <entry><type>sql_identifier</type></entry>
3845 <entry>Name of the type</entry>
3849 <entry><literal>privilege_type</literal></entry>
3850 <entry><type>character_data</type></entry>
3851 <entry>Always <literal>TYPE USAGE</literal></entry>
3855 <entry><literal>is_grantable</literal></entry>
3856 <entry><type>yes_or_no</type></entry>
3857 <entry><literal>YES</literal> if the privilege is grantable, <literal>NO</literal> if not</entry>
3864 <sect1 id="infoschema-role-usage-grants">
3865 <title><literal>role_usage_grants</literal></title>
3868 The view <literal>role_usage_grants</literal> identifies
3869 <literal>USAGE</literal> privileges granted on various kinds of
3870 objects where the grantor or grantee is a currently enabled role.
3871 Further information can be found under
3872 <literal>usage_privileges</literal>. The only effective difference
3873 between this view and <literal>usage_privileges</literal> is that
3874 this view omits objects that have been made accessible to the
3875 current user by way of a grant to <literal>PUBLIC</literal>.
3879 <title><literal>role_usage_grants</literal> Columns</title>
3885 <entry>Data Type</entry>
3886 <entry>Description</entry>
3892 <entry><literal>grantor</literal></entry>
3893 <entry><type>sql_identifier</type></entry>
3894 <entry>The name of the role that granted the privilege</entry>
3898 <entry><literal>grantee</literal></entry>
3899 <entry><type>sql_identifier</type></entry>
3900 <entry>The name of the role that the privilege was granted to</entry>
3904 <entry><literal>object_catalog</literal></entry>
3905 <entry><type>sql_identifier</type></entry>
3906 <entry>Name of the database containing the object (always the current database)</entry>
3910 <entry><literal>object_schema</literal></entry>
3911 <entry><type>sql_identifier</type></entry>
3912 <entry>Name of the schema containing the object, if applicable,
3913 else an empty string</entry>
3917 <entry><literal>object_name</literal></entry>
3918 <entry><type>sql_identifier</type></entry>
3919 <entry>Name of the object</entry>
3923 <entry><literal>object_type</literal></entry>
3924 <entry><type>character_data</type></entry>
3925 <entry><literal>COLLATION</literal> or <literal>DOMAIN</literal> or <literal>FOREIGN DATA WRAPPER</literal> or <literal>FOREIGN SERVER</literal> or <literal>SEQUENCE</literal></entry>
3929 <entry><literal>privilege_type</literal></entry>
3930 <entry><type>character_data</type></entry>
3931 <entry>Always <literal>USAGE</literal></entry>
3935 <entry><literal>is_grantable</literal></entry>
3936 <entry><type>yes_or_no</type></entry>
3937 <entry><literal>YES</literal> if the privilege is grantable, <literal>NO</literal> if not</entry>
3944 <sect1 id="infoschema-routine-privileges">
3945 <title><literal>routine_privileges</literal></title>
3948 The view <literal>routine_privileges</literal> identifies all
3949 privileges granted on functions to a currently enabled role or by a
3950 currently enabled role. There is one row for each combination of function,
3951 grantor, and grantee.
3955 <title><literal>routine_privileges</literal> Columns</title>
3961 <entry>Data Type</entry>
3962 <entry>Description</entry>
3968 <entry><literal>grantor</literal></entry>
3969 <entry><type>sql_identifier</type></entry>
3970 <entry>Name of the role that granted the privilege</entry>
3974 <entry><literal>grantee</literal></entry>
3975 <entry><type>sql_identifier</type></entry>
3976 <entry>Name of the role that the privilege was granted to</entry>
3980 <entry><literal>specific_catalog</literal></entry>
3981 <entry><type>sql_identifier</type></entry>
3982 <entry>Name of the database containing the function (always the current database)</entry>
3986 <entry><literal>specific_schema</literal></entry>
3987 <entry><type>sql_identifier</type></entry>
3988 <entry>Name of the schema containing the function</entry>
3992 <entry><literal>specific_name</literal></entry>
3993 <entry><type>sql_identifier</type></entry>
3995 The <quote>specific name</quote> of the function. See <xref
3996 linkend="infoschema-routines"/> for more information.
4001 <entry><literal>routine_catalog</literal></entry>
4002 <entry><type>sql_identifier</type></entry>
4003 <entry>Name of the database containing the function (always the current database)</entry>
4007 <entry><literal>routine_schema</literal></entry>
4008 <entry><type>sql_identifier</type></entry>
4009 <entry>Name of the schema containing the function</entry>
4013 <entry><literal>routine_name</literal></entry>
4014 <entry><type>sql_identifier</type></entry>
4015 <entry>Name of the function (might be duplicated in case of overloading)</entry>
4019 <entry><literal>privilege_type</literal></entry>
4020 <entry><type>character_data</type></entry>
4021 <entry>Always <literal>EXECUTE</literal> (the only privilege type for functions)</entry>
4025 <entry><literal>is_grantable</literal></entry>
4026 <entry><type>yes_or_no</type></entry>
4027 <entry><literal>YES</literal> if the privilege is grantable, <literal>NO</literal> if not</entry>
4034 <sect1 id="infoschema-routines">
4035 <title><literal>routines</literal></title>
4038 The view <literal>routines</literal> contains all functions and procedures in the
4039 current database. Only those functions and procedures are shown that the current
4040 user has access to (by way of being the owner or having some
4045 <title><literal>routines</literal> Columns</title>
4051 <entry>Data Type</entry>
4052 <entry>Description</entry>
4058 <entry><literal>specific_catalog</literal></entry>
4059 <entry><type>sql_identifier</type></entry>
4060 <entry>Name of the database containing the function (always the current database)</entry>
4064 <entry><literal>specific_schema</literal></entry>
4065 <entry><type>sql_identifier</type></entry>
4066 <entry>Name of the schema containing the function</entry>
4070 <entry><literal>specific_name</literal></entry>
4071 <entry><type>sql_identifier</type></entry>
4073 The <quote>specific name</quote> of the function. This is a
4074 name that uniquely identifies the function in the schema, even
4075 if the real name of the function is overloaded. The format of
4076 the specific name is not defined, it should only be used to
4077 compare it to other instances of specific routine names.
4082 <entry><literal>routine_catalog</literal></entry>
4083 <entry><type>sql_identifier</type></entry>
4084 <entry>Name of the database containing the function (always the current database)</entry>
4088 <entry><literal>routine_schema</literal></entry>
4089 <entry><type>sql_identifier</type></entry>
4090 <entry>Name of the schema containing the function</entry>
4094 <entry><literal>routine_name</literal></entry>
4095 <entry><type>sql_identifier</type></entry>
4096 <entry>Name of the function (might be duplicated in case of overloading)</entry>
4100 <entry><literal>routine_type</literal></entry>
4101 <entry><type>character_data</type></entry>
4103 <literal>FUNCTION</literal> for a
4104 function, <literal>PROCEDURE</literal> for a procedure
4109 <entry><literal>module_catalog</literal></entry>
4110 <entry><type>sql_identifier</type></entry>
4111 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4115 <entry><literal>module_schema</literal></entry>
4116 <entry><type>sql_identifier</type></entry>
4117 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4121 <entry><literal>module_name</literal></entry>
4122 <entry><type>sql_identifier</type></entry>
4123 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4127 <entry><literal>udt_catalog</literal></entry>
4128 <entry><type>sql_identifier</type></entry>
4129 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4133 <entry><literal>udt_schema</literal></entry>
4134 <entry><type>sql_identifier</type></entry>
4135 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4139 <entry><literal>udt_name</literal></entry>
4140 <entry><type>sql_identifier</type></entry>
4141 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4145 <entry><literal>data_type</literal></entry>
4146 <entry><type>character_data</type></entry>
4148 Return data type of the function, if it is a built-in type, or
4149 <literal>ARRAY</literal> if it is some array (in that case, see
4150 the view <literal>element_types</literal>), else
4151 <literal>USER-DEFINED</literal> (in that case, the type is
4152 identified in <literal>type_udt_name</literal> and associated
4153 columns). Null for a procedure.
4158 <entry><literal>character_maximum_length</literal></entry>
4159 <entry><type>cardinal_number</type></entry>
4160 <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry>
4164 <entry><literal>character_octet_length</literal></entry>
4165 <entry><type>cardinal_number</type></entry>
4166 <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry>
4170 <entry><literal>character_set_catalog</literal></entry>
4171 <entry><type>sql_identifier</type></entry>
4172 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4176 <entry><literal>character_set_schema</literal></entry>
4177 <entry><type>sql_identifier</type></entry>
4178 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4182 <entry><literal>character_set_name</literal></entry>
4183 <entry><type>sql_identifier</type></entry>
4184 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4188 <entry><literal>collation_catalog</literal></entry>
4189 <entry><type>sql_identifier</type></entry>
4190 <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry>
4194 <entry><literal>collation_schema</literal></entry>
4195 <entry><type>sql_identifier</type></entry>
4196 <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry>
4200 <entry><literal>collation_name</literal></entry>
4201 <entry><type>sql_identifier</type></entry>
4202 <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry>
4206 <entry><literal>numeric_precision</literal></entry>
4207 <entry><type>cardinal_number</type></entry>
4208 <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry>
4212 <entry><literal>numeric_precision_radix</literal></entry>
4213 <entry><type>cardinal_number</type></entry>
4214 <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry>
4218 <entry><literal>numeric_scale</literal></entry>
4219 <entry><type>cardinal_number</type></entry>
4220 <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry>
4224 <entry><literal>datetime_precision</literal></entry>
4225 <entry><type>cardinal_number</type></entry>
4226 <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry>
4230 <entry><literal>interval_type</literal></entry>
4231 <entry><type>character_data</type></entry>
4232 <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry>
4236 <entry><literal>interval_precision</literal></entry>
4237 <entry><type>cardinal_number</type></entry>
4238 <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</productname></entry>
4242 <entry><literal>type_udt_catalog</literal></entry>
4243 <entry><type>sql_identifier</type></entry>
4245 Name of the database that the return data type of the function
4246 is defined in (always the current database). Null for a procedure.
4251 <entry><literal>type_udt_schema</literal></entry>
4252 <entry><type>sql_identifier</type></entry>
4254 Name of the schema that the return data type of the function is
4255 defined in. Null for a procedure.
4260 <entry><literal>type_udt_name</literal></entry>
4261 <entry><type>sql_identifier</type></entry>
4263 Name of the return data type of the function. Null for a procedure.
4268 <entry><literal>scope_catalog</literal></entry>
4269 <entry><type>sql_identifier</type></entry>
4270 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4274 <entry><literal>scope_schema</literal></entry>
4275 <entry><type>sql_identifier</type></entry>
4276 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4280 <entry><literal>scope_name</literal></entry>
4281 <entry><type>sql_identifier</type></entry>
4282 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4286 <entry><literal>maximum_cardinality</literal></entry>
4287 <entry><type>cardinal_number</type></entry>
4288 <entry>Always null, because arrays always have unlimited maximum cardinality in <productname>PostgreSQL</productname></entry>
4292 <entry><literal>dtd_identifier</literal></entry>
4293 <entry><type>sql_identifier</type></entry>
4295 An identifier of the data type descriptor of the return data
4296 type of this function, unique among the data type descriptors
4297 pertaining to the function. This is mainly useful for joining
4298 with other instances of such identifiers. (The specific format
4299 of the identifier is not defined and not guaranteed to remain
4300 the same in future versions.)
4305 <entry><literal>routine_body</literal></entry>
4306 <entry><type>character_data</type></entry>
4308 If the function is an SQL function, then
4309 <literal>SQL</literal>, else <literal>EXTERNAL</literal>.
4314 <entry><literal>routine_definition</literal></entry>
4315 <entry><type>character_data</type></entry>
4317 The source text of the function (null if the function is not
4318 owned by a currently enabled role). (According to the SQL
4319 standard, this column is only applicable if
4320 <literal>routine_body</literal> is <literal>SQL</literal>, but
4321 in <productname>PostgreSQL</productname> it will contain
4322 whatever source text was specified when the function was
4328 <entry><literal>external_name</literal></entry>
4329 <entry><type>character_data</type></entry>
4331 If this function is a C function, then the external name (link
4332 symbol) of the function; else null. (This works out to be the
4333 same value that is shown in
4334 <literal>routine_definition</literal>.)
4339 <entry><literal>external_language</literal></entry>
4340 <entry><type>character_data</type></entry>
4341 <entry>The language the function is written in</entry>
4345 <entry><literal>parameter_style</literal></entry>
4346 <entry><type>character_data</type></entry>
4348 Always <literal>GENERAL</literal> (The SQL standard defines
4349 other parameter styles, which are not available in <productname>PostgreSQL</productname>.)
4354 <entry><literal>is_deterministic</literal></entry>
4355 <entry><type>yes_or_no</type></entry>
4357 If the function is declared immutable (called deterministic in
4358 the SQL standard), then <literal>YES</literal>, else
4359 <literal>NO</literal>. (You cannot query the other volatility
4360 levels available in <productname>PostgreSQL</productname> through the information schema.)
4365 <entry><literal>sql_data_access</literal></entry>
4366 <entry><type>character_data</type></entry>
4368 Always <literal>MODIFIES</literal>, meaning that the function
4369 possibly modifies SQL data. This information is not useful for
4370 <productname>PostgreSQL</productname>.
4375 <entry><literal>is_null_call</literal></entry>
4376 <entry><type>yes_or_no</type></entry>
4378 If the function automatically returns null if any of its
4379 arguments are null, then <literal>YES</literal>, else
4380 <literal>NO</literal>. Null for a procedure.
4385 <entry><literal>sql_path</literal></entry>
4386 <entry><type>character_data</type></entry>
4387 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4391 <entry><literal>schema_level_routine</literal></entry>
4392 <entry><type>yes_or_no</type></entry>
4394 Always <literal>YES</literal> (The opposite would be a method
4395 of a user-defined type, which is a feature not available in
4396 <productname>PostgreSQL</productname>.)
4401 <entry><literal>max_dynamic_result_sets</literal></entry>
4402 <entry><type>cardinal_number</type></entry>
4403 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4407 <entry><literal>is_user_defined_cast</literal></entry>
4408 <entry><type>yes_or_no</type></entry>
4409 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4413 <entry><literal>is_implicitly_invocable</literal></entry>
4414 <entry><type>yes_or_no</type></entry>
4415 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4419 <entry><literal>security_type</literal></entry>
4420 <entry><type>character_data</type></entry>
4422 If the function runs with the privileges of the current user,
4423 then <literal>INVOKER</literal>, if the function runs with the
4424 privileges of the user who defined it, then
4425 <literal>DEFINER</literal>.
4430 <entry><literal>to_sql_specific_catalog</literal></entry>
4431 <entry><type>sql_identifier</type></entry>
4432 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4436 <entry><literal>to_sql_specific_schema</literal></entry>
4437 <entry><type>sql_identifier</type></entry>
4438 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4442 <entry><literal>to_sql_specific_name</literal></entry>
4443 <entry><type>sql_identifier</type></entry>
4444 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4448 <entry><literal>as_locator</literal></entry>
4449 <entry><type>yes_or_no</type></entry>
4450 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4454 <entry><literal>created</literal></entry>
4455 <entry><type>time_stamp</type></entry>
4456 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4460 <entry><literal>last_altered</literal></entry>
4461 <entry><type>time_stamp</type></entry>
4462 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4466 <entry><literal>new_savepoint_level</literal></entry>
4467 <entry><type>yes_or_no</type></entry>
4468 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4472 <entry><literal>is_udt_dependent</literal></entry>
4473 <entry><type>yes_or_no</type></entry>
4475 Currently always <literal>NO</literal>. The alternative
4476 <literal>YES</literal> applies to a feature not available in
4477 <productname>PostgreSQL</productname>.
4482 <entry><literal>result_cast_from_data_type</literal></entry>
4483 <entry><type>character_data</type></entry>
4484 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4488 <entry><literal>result_cast_as_locator</literal></entry>
4489 <entry><type>yes_or_no</type></entry>
4490 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4494 <entry><literal>result_cast_char_max_length</literal></entry>
4495 <entry><type>cardinal_number</type></entry>
4496 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4500 <entry><literal>result_cast_char_octet_length</literal></entry>
4501 <entry><type>character_data</type></entry>
4502 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4506 <entry><literal>result_cast_char_set_catalog</literal></entry>
4507 <entry><type>sql_identifier</type></entry>
4508 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4512 <entry><literal>result_cast_char_set_schema</literal></entry>
4513 <entry><type>sql_identifier</type></entry>
4514 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4518 <entry><literal>result_cast_char_set_name</literal></entry>
4519 <entry><type>sql_identifier</type></entry>
4520 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4524 <entry><literal>result_cast_collation_catalog</literal></entry>
4525 <entry><type>sql_identifier</type></entry>
4526 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4530 <entry><literal>result_cast_collation_schema</literal></entry>
4531 <entry><type>sql_identifier</type></entry>
4532 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4536 <entry><literal>result_cast_collation_name</literal></entry>
4537 <entry><type>sql_identifier</type></entry>
4538 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4542 <entry><literal>result_cast_numeric_precision</literal></entry>
4543 <entry><type>cardinal_number</type></entry>
4544 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4548 <entry><literal>result_cast_numeric_precision_radix</literal></entry>
4549 <entry><type>cardinal_number</type></entry>
4550 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4554 <entry><literal>result_cast_numeric_scale</literal></entry>
4555 <entry><type>cardinal_number</type></entry>
4556 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4560 <entry><literal>result_cast_datetime_precision</literal></entry>
4561 <entry><type>character_data</type></entry>
4562 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4566 <entry><literal>result_cast_interval_type</literal></entry>
4567 <entry><type>character_data</type></entry>
4568 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4572 <entry><literal>result_cast_interval_precision</literal></entry>
4573 <entry><type>cardinal_number</type></entry>
4574 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4578 <entry><literal>result_cast_type_udt_catalog</literal></entry>
4579 <entry><type>sql_identifier</type></entry>
4580 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4584 <entry><literal>result_cast_type_udt_schema</literal></entry>
4585 <entry><type>sql_identifier</type></entry>
4586 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4590 <entry><literal>result_cast_type_udt_name</literal></entry>
4591 <entry><type>sql_identifier</type></entry>
4592 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4596 <entry><literal>result_cast_scope_catalog</literal></entry>
4597 <entry><type>sql_identifier</type></entry>
4598 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4602 <entry><literal>result_cast_scope_schema</literal></entry>
4603 <entry><type>sql_identifier</type></entry>
4604 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4608 <entry><literal>result_cast_scope_name</literal></entry>
4609 <entry><type>sql_identifier</type></entry>
4610 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4614 <entry><literal>result_cast_maximum_cardinality</literal></entry>
4615 <entry><type>cardinal_number</type></entry>
4616 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4620 <entry><literal>result_cast_dtd_identifier</literal></entry>
4621 <entry><type>sql_identifier</type></entry>
4622 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4629 <sect1 id="infoschema-schemata">
4630 <title><literal>schemata</literal></title>
4633 The view <literal>schemata</literal> contains all schemas in the current
4634 database that the current user has access to (by way of being the owner or
4635 having some privilege).
4639 <title><literal>schemata</literal> Columns</title>
4645 <entry>Data Type</entry>
4646 <entry>Description</entry>
4652 <entry><literal>catalog_name</literal></entry>
4653 <entry><type>sql_identifier</type></entry>
4654 <entry>Name of the database that the schema is contained in (always the current database)</entry>
4658 <entry><literal>schema_name</literal></entry>
4659 <entry><type>sql_identifier</type></entry>
4660 <entry>Name of the schema</entry>
4664 <entry><literal>schema_owner</literal></entry>
4665 <entry><type>sql_identifier</type></entry>
4666 <entry>Name of the owner of the schema</entry>
4670 <entry><literal>default_character_set_catalog</literal></entry>
4671 <entry><type>sql_identifier</type></entry>
4672 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4676 <entry><literal>default_character_set_schema</literal></entry>
4677 <entry><type>sql_identifier</type></entry>
4678 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4682 <entry><literal>default_character_set_name</literal></entry>
4683 <entry><type>sql_identifier</type></entry>
4684 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4688 <entry><literal>sql_path</literal></entry>
4689 <entry><type>character_data</type></entry>
4690 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
4697 <sect1 id="infoschema-sequences">
4698 <title><literal>sequences</literal></title>
4701 The view <literal>sequences</literal> contains all sequences
4702 defined in the current database. Only those sequences are shown
4703 that the current user has access to (by way of being the owner or
4704 having some privilege).
4708 <title><literal>sequences</literal> Columns</title>
4714 <entry>Data Type</entry>
4715 <entry>Description</entry>
4721 <entry><literal>sequence_catalog</literal></entry>
4722 <entry><type>sql_identifier</type></entry>
4723 <entry>Name of the database that contains the sequence (always the current database)</entry>
4727 <entry><literal>sequence_schema</literal></entry>
4728 <entry><type>sql_identifier</type></entry>
4729 <entry>Name of the schema that contains the sequence</entry>
4733 <entry><literal>sequence_name</literal></entry>
4734 <entry><type>sql_identifier</type></entry>
4735 <entry>Name of the sequence</entry>
4739 <entry><literal>data_type</literal></entry>
4740 <entry><type>character_data</type></entry>
4742 The data type of the sequence.
4747 <entry><literal>numeric_precision</literal></entry>
4748 <entry><type>cardinal_number</type></entry>
4750 This column contains the (declared or implicit) precision of
4751 the sequence data type (see above). The precision indicates
4752 the number of significant digits. It can be expressed in
4753 decimal (base 10) or binary (base 2) terms, as specified in the
4754 column <literal>numeric_precision_radix</literal>.
4759 <entry><literal>numeric_precision_radix</literal></entry>
4760 <entry><type>cardinal_number</type></entry>
4762 This column indicates in which base the values in the columns
4763 <literal>numeric_precision</literal> and
4764 <literal>numeric_scale</literal> are expressed. The value is
4770 <entry><literal>numeric_scale</literal></entry>
4771 <entry><type>cardinal_number</type></entry>
4773 This column contains the (declared or implicit) scale of the
4774 sequence data type (see above). The scale indicates the number
4775 of significant digits to the right of the decimal point. It
4776 can be expressed in decimal (base 10) or binary (base 2) terms,
4777 as specified in the column
4778 <literal>numeric_precision_radix</literal>.
4783 <entry><literal>start_value</literal></entry>
4784 <entry><type>character_data</type></entry>
4785 <entry>The start value of the sequence</entry>
4789 <entry><literal>minimum_value</literal></entry>
4790 <entry><type>character_data</type></entry>
4791 <entry>The minimum value of the sequence</entry>
4795 <entry><literal>maximum_value</literal></entry>
4796 <entry><type>character_data</type></entry>
4797 <entry>The maximum value of the sequence</entry>
4801 <entry><literal>increment</literal></entry>
4802 <entry><type>character_data</type></entry>
4803 <entry>The increment of the sequence</entry>
4807 <entry><literal>cycle_option</literal></entry>
4808 <entry><type>yes_or_no</type></entry>
4809 <entry><literal>YES</literal> if the sequence cycles, else <literal>NO</literal></entry>
4816 Note that in accordance with the SQL standard, the start, minimum,
4817 maximum, and increment values are returned as character strings.
4821 <sect1 id="infoschema-sql-features">
4822 <title><literal>sql_features</literal></title>
4825 The table <literal>sql_features</literal> contains information
4826 about which formal features defined in the SQL standard are
4827 supported by <productname>PostgreSQL</productname>. This is the
4828 same information that is presented in <xref linkend="features"/>.
4829 There you can also find some additional background information.
4833 <title><literal>sql_features</literal> Columns</title>
4839 <entry>Data Type</entry>
4840 <entry>Description</entry>
4846 <entry><literal>feature_id</literal></entry>
4847 <entry><type>character_data</type></entry>
4848 <entry>Identifier string of the feature</entry>
4852 <entry><literal>feature_name</literal></entry>
4853 <entry><type>character_data</type></entry>
4854 <entry>Descriptive name of the feature</entry>
4858 <entry><literal>sub_feature_id</literal></entry>
4859 <entry><type>character_data</type></entry>
4860 <entry>Identifier string of the subfeature, or a zero-length string if not a subfeature</entry>
4864 <entry><literal>sub_feature_name</literal></entry>
4865 <entry><type>character_data</type></entry>
4866 <entry>Descriptive name of the subfeature, or a zero-length string if not a subfeature</entry>
4870 <entry><literal>is_supported</literal></entry>
4871 <entry><type>yes_or_no</type></entry>
4873 <literal>YES</literal> if the feature is fully supported by the
4874 current version of <productname>PostgreSQL</productname>, <literal>NO</literal> if not
4879 <entry><literal>is_verified_by</literal></entry>
4880 <entry><type>character_data</type></entry>
4882 Always null, since the <productname>PostgreSQL</productname> development group does not
4883 perform formal testing of feature conformance
4888 <entry><literal>comments</literal></entry>
4889 <entry><type>character_data</type></entry>
4890 <entry>Possibly a comment about the supported status of the feature</entry>
4897 <sect1 id="infoschema-sql-implementation-info">
4898 <title><literal>sql_implementation_info</literal></title>
4901 The table <literal>sql_implementation_info</literal> contains
4902 information about various aspects that are left
4903 implementation-defined by the SQL standard. This information is
4904 primarily intended for use in the context of the ODBC interface;
4905 users of other interfaces will probably find this information to be
4906 of little use. For this reason, the individual implementation
4907 information items are not described here; you will find them in the
4908 description of the ODBC interface.
4912 <title><literal>sql_implementation_info</literal> Columns</title>
4918 <entry>Data Type</entry>
4919 <entry>Description</entry>
4925 <entry><literal>implementation_info_id</literal></entry>
4926 <entry><type>character_data</type></entry>
4927 <entry>Identifier string of the implementation information item</entry>
4931 <entry><literal>implementation_info_name</literal></entry>
4932 <entry><type>character_data</type></entry>
4933 <entry>Descriptive name of the implementation information item</entry>
4937 <entry><literal>integer_value</literal></entry>
4938 <entry><type>cardinal_number</type></entry>
4940 Value of the implementation information item, or null if the
4941 value is contained in the column
4942 <literal>character_value</literal>
4947 <entry><literal>character_value</literal></entry>
4948 <entry><type>character_data</type></entry>
4950 Value of the implementation information item, or null if the
4951 value is contained in the column
4952 <literal>integer_value</literal>
4957 <entry><literal>comments</literal></entry>
4958 <entry><type>character_data</type></entry>
4959 <entry>Possibly a comment pertaining to the implementation information item</entry>
4966 <sect1 id="infoschema-sql-languages">
4967 <title><literal>sql_languages</literal></title>
4970 The table <literal>sql_languages</literal> contains one row for
4971 each SQL language binding that is supported by
4972 <productname>PostgreSQL</productname>.
4973 <productname>PostgreSQL</productname> supports direct SQL and
4974 embedded SQL in C; that is all you will learn from this table.
4978 This table was removed from the SQL standard in SQL:2008, so there
4979 are no entries referring to standards later than SQL:2003.
4983 <title><literal>sql_languages</literal> Columns</title>
4989 <entry>Data Type</entry>
4990 <entry>Description</entry>
4996 <entry><literal>sql_language_source</literal></entry>
4997 <entry><type>character_data</type></entry>
4999 The name of the source of the language definition; always
5000 <literal>ISO 9075</literal>, that is, the SQL standard
5005 <entry><literal>sql_language_year</literal></entry>
5006 <entry><type>character_data</type></entry>
5008 The year the standard referenced in
5009 <literal>sql_language_source</literal> was approved.
5014 <entry><literal>sql_language_conformance</literal></entry>
5015 <entry><type>character_data</type></entry>
5017 The standard conformance level for the language binding. For
5018 ISO 9075:2003 this is always <literal>CORE</literal>.
5023 <entry><literal>sql_language_integrity</literal></entry>
5024 <entry><type>character_data</type></entry>
5025 <entry>Always null (This value is relevant to an earlier version of the SQL standard.)</entry>
5029 <entry><literal>sql_language_implementation</literal></entry>
5030 <entry><type>character_data</type></entry>
5031 <entry>Always null</entry>
5035 <entry><literal>sql_language_binding_style</literal></entry>
5036 <entry><type>character_data</type></entry>
5038 The language binding style, either <literal>DIRECT</literal> or
5039 <literal>EMBEDDED</literal>
5044 <entry><literal>sql_language_programming_language</literal></entry>
5045 <entry><type>character_data</type></entry>
5047 The programming language, if the binding style is
5048 <literal>EMBEDDED</literal>, else null. <productname>PostgreSQL</productname> only
5049 supports the language C.
5057 <sect1 id="infoschema-sql-packages">
5058 <title><literal>sql_packages</literal></title>
5061 The table <literal>sql_packages</literal> contains information
5062 about which feature packages defined in the SQL standard are
5063 supported by <productname>PostgreSQL</productname>. Refer to <xref
5064 linkend="features"/> for background information on feature packages.
5068 <title><literal>sql_packages</literal> Columns</title>
5074 <entry>Data Type</entry>
5075 <entry>Description</entry>
5081 <entry><literal>feature_id</literal></entry>
5082 <entry><type>character_data</type></entry>
5083 <entry>Identifier string of the package</entry>
5087 <entry><literal>feature_name</literal></entry>
5088 <entry><type>character_data</type></entry>
5089 <entry>Descriptive name of the package</entry>
5093 <entry><literal>is_supported</literal></entry>
5094 <entry><type>yes_or_no</type></entry>
5096 <literal>YES</literal> if the package is fully supported by the
5097 current version of <productname>PostgreSQL</productname>, <literal>NO</literal> if not
5102 <entry><literal>is_verified_by</literal></entry>
5103 <entry><type>character_data</type></entry>
5105 Always null, since the <productname>PostgreSQL</productname> development group does not
5106 perform formal testing of feature conformance
5111 <entry><literal>comments</literal></entry>
5112 <entry><type>character_data</type></entry>
5113 <entry>Possibly a comment about the supported status of the package</entry>
5120 <sect1 id="infoschema-sql-parts">
5121 <title><literal>sql_parts</literal></title>
5124 The table <literal>sql_parts</literal> contains information about
5125 which of the several parts of the SQL standard are supported by
5126 <productname>PostgreSQL</productname>.
5130 <title><literal>sql_parts</literal> Columns</title>
5136 <entry>Data Type</entry>
5137 <entry>Description</entry>
5143 <entry><literal>feature_id</literal></entry>
5144 <entry><type>character_data</type></entry>
5145 <entry>An identifier string containing the number of the part</entry>
5149 <entry><literal>feature_name</literal></entry>
5150 <entry><type>character_data</type></entry>
5151 <entry>Descriptive name of the part</entry>
5155 <entry><literal>is_supported</literal></entry>
5156 <entry><type>yes_or_no</type></entry>
5158 <literal>YES</literal> if the part is fully supported by the
5159 current version of <productname>PostgreSQL</productname>,
5160 <literal>NO</literal> if not
5165 <entry><literal>is_verified_by</literal></entry>
5166 <entry><type>character_data</type></entry>
5168 Always null, since the <productname>PostgreSQL</productname> development group does not
5169 perform formal testing of feature conformance
5174 <entry><literal>comments</literal></entry>
5175 <entry><type>character_data</type></entry>
5176 <entry>Possibly a comment about the supported status of the part</entry>
5183 <sect1 id="infoschema-sql-sizing">
5184 <title><literal>sql_sizing</literal></title>
5187 The table <literal>sql_sizing</literal> contains information about
5188 various size limits and maximum values in
5189 <productname>PostgreSQL</productname>. This information is
5190 primarily intended for use in the context of the ODBC interface;
5191 users of other interfaces will probably find this information to be
5192 of little use. For this reason, the individual sizing items are
5193 not described here; you will find them in the description of the
5198 <title><literal>sql_sizing</literal> Columns</title>
5204 <entry>Data Type</entry>
5205 <entry>Description</entry>
5211 <entry><literal>sizing_id</literal></entry>
5212 <entry><type>cardinal_number</type></entry>
5213 <entry>Identifier of the sizing item</entry>
5217 <entry><literal>sizing_name</literal></entry>
5218 <entry><type>character_data</type></entry>
5219 <entry>Descriptive name of the sizing item</entry>
5223 <entry><literal>supported_value</literal></entry>
5224 <entry><type>cardinal_number</type></entry>
5226 Value of the sizing item, or 0 if the size is unlimited or
5227 cannot be determined, or null if the features for which the
5228 sizing item is applicable are not supported
5233 <entry><literal>comments</literal></entry>
5234 <entry><type>character_data</type></entry>
5235 <entry>Possibly a comment pertaining to the sizing item</entry>
5242 <sect1 id="infoschema-sql-sizing-profiles">
5243 <title><literal>sql_sizing_profiles</literal></title>
5246 The table <literal>sql_sizing_profiles</literal> contains
5247 information about the <literal>sql_sizing</literal> values that are
5248 required by various profiles of the SQL standard. <productname>PostgreSQL</productname> does
5249 not track any SQL profiles, so this table is empty.
5253 <title><literal>sql_sizing_profiles</literal> Columns</title>
5259 <entry>Data Type</entry>
5260 <entry>Description</entry>
5266 <entry><literal>sizing_id</literal></entry>
5267 <entry><type>cardinal_number</type></entry>
5268 <entry>Identifier of the sizing item</entry>
5272 <entry><literal>sizing_name</literal></entry>
5273 <entry><type>character_data</type></entry>
5274 <entry>Descriptive name of the sizing item</entry>
5278 <entry><literal>profile_id</literal></entry>
5279 <entry><type>character_data</type></entry>
5280 <entry>Identifier string of a profile</entry>
5284 <entry><literal>required_value</literal></entry>
5285 <entry><type>cardinal_number</type></entry>
5287 The value required by the SQL profile for the sizing item, or 0
5288 if the profile places no limit on the sizing item, or null if
5289 the profile does not require any of the features for which the
5290 sizing item is applicable
5295 <entry><literal>comments</literal></entry>
5296 <entry><type>character_data</type></entry>
5297 <entry>Possibly a comment pertaining to the sizing item within the profile</entry>
5304 <sect1 id="infoschema-table-constraints">
5305 <title><literal>table_constraints</literal></title>
5308 The view <literal>table_constraints</literal> contains all
5309 constraints belonging to tables that the current user owns or has
5310 some privilege other than <literal>SELECT</literal> on.
5314 <title><literal>table_constraints</literal> Columns</title>
5320 <entry>Data Type</entry>
5321 <entry>Description</entry>
5327 <entry><literal>constraint_catalog</literal></entry>
5328 <entry><type>sql_identifier</type></entry>
5329 <entry>Name of the database that contains the constraint (always the current database)</entry>
5333 <entry><literal>constraint_schema</literal></entry>
5334 <entry><type>sql_identifier</type></entry>
5335 <entry>Name of the schema that contains the constraint</entry>
5339 <entry><literal>constraint_name</literal></entry>
5340 <entry><type>sql_identifier</type></entry>
5341 <entry>Name of the constraint</entry>
5345 <entry><literal>table_catalog</literal></entry>
5346 <entry><type>sql_identifier</type></entry>
5347 <entry>Name of the database that contains the table (always the current database)</entry>
5351 <entry><literal>table_schema</literal></entry>
5352 <entry><type>sql_identifier</type></entry>
5353 <entry>Name of the schema that contains the table</entry>
5357 <entry><literal>table_name</literal></entry>
5358 <entry><type>sql_identifier</type></entry>
5359 <entry>Name of the table</entry>
5363 <entry><literal>constraint_type</literal></entry>
5364 <entry><type>character_data</type></entry>
5366 Type of the constraint: <literal>CHECK</literal>,
5367 <literal>FOREIGN KEY</literal>, <literal>PRIMARY KEY</literal>,
5368 or <literal>UNIQUE</literal>
5373 <entry><literal>is_deferrable</literal></entry>
5374 <entry><type>yes_or_no</type></entry>
5375 <entry><literal>YES</literal> if the constraint is deferrable, <literal>NO</literal> if not</entry>
5379 <entry><literal>initially_deferred</literal></entry>
5380 <entry><type>yes_or_no</type></entry>
5381 <entry><literal>YES</literal> if the constraint is deferrable and initially deferred, <literal>NO</literal> if not</entry>
5384 <entry><literal>enforced</literal></entry>
5385 <entry><type>yes_or_no</type></entry>
5386 <entry>Applies to a feature not available in
5387 <productname>PostgreSQL</productname> (currently always
5388 <literal>YES</literal>)</entry>
5395 <sect1 id="infoschema-table-privileges">
5396 <title><literal>table_privileges</literal></title>
5399 The view <literal>table_privileges</literal> identifies all
5400 privileges granted on tables or views to a currently enabled role
5401 or by a currently enabled role. There is one row for each
5402 combination of table, grantor, and grantee.
5406 <title><literal>table_privileges</literal> Columns</title>
5412 <entry>Data Type</entry>
5413 <entry>Description</entry>
5419 <entry><literal>grantor</literal></entry>
5420 <entry><type>sql_identifier</type></entry>
5421 <entry>Name of the role that granted the privilege</entry>
5425 <entry><literal>grantee</literal></entry>
5426 <entry><type>sql_identifier</type></entry>
5427 <entry>Name of the role that the privilege was granted to</entry>
5431 <entry><literal>table_catalog</literal></entry>
5432 <entry><type>sql_identifier</type></entry>
5433 <entry>Name of the database that contains the table (always the current database)</entry>
5437 <entry><literal>table_schema</literal></entry>
5438 <entry><type>sql_identifier</type></entry>
5439 <entry>Name of the schema that contains the table</entry>
5443 <entry><literal>table_name</literal></entry>
5444 <entry><type>sql_identifier</type></entry>
5445 <entry>Name of the table</entry>
5449 <entry><literal>privilege_type</literal></entry>
5450 <entry><type>character_data</type></entry>
5452 Type of the privilege: <literal>SELECT</literal>,
5453 <literal>INSERT</literal>, <literal>UPDATE</literal>,
5454 <literal>DELETE</literal>, <literal>TRUNCATE</literal>,
5455 <literal>REFERENCES</literal>, or <literal>TRIGGER</literal>
5460 <entry><literal>is_grantable</literal></entry>
5461 <entry><type>yes_or_no</type></entry>
5462 <entry><literal>YES</literal> if the privilege is grantable, <literal>NO</literal> if not</entry>
5466 <entry><literal>with_hierarchy</literal></entry>
5467 <entry><type>yes_or_no</type></entry>
5469 In the SQL standard, <literal>WITH HIERARCHY OPTION</literal>
5470 is a separate (sub-)privilege allowing certain operations on
5471 table inheritance hierarchies. In PostgreSQL, this is included
5472 in the <literal>SELECT</literal> privilege, so this column
5473 shows <literal>YES</literal> if the privilege
5474 is <literal>SELECT</literal>, else <literal>NO</literal>.
5482 <sect1 id="infoschema-tables">
5483 <title><literal>tables</literal></title>
5486 The view <literal>tables</literal> contains all tables and views
5487 defined in the current database. Only those tables and views are
5488 shown that the current user has access to (by way of being the
5489 owner or having some privilege).
5493 <title><literal>tables</literal> Columns</title>
5499 <entry>Data Type</entry>
5500 <entry>Description</entry>
5506 <entry><literal>table_catalog</literal></entry>
5507 <entry><type>sql_identifier</type></entry>
5508 <entry>Name of the database that contains the table (always the current database)</entry>
5512 <entry><literal>table_schema</literal></entry>
5513 <entry><type>sql_identifier</type></entry>
5514 <entry>Name of the schema that contains the table</entry>
5518 <entry><literal>table_name</literal></entry>
5519 <entry><type>sql_identifier</type></entry>
5520 <entry>Name of the table</entry>
5524 <entry><literal>table_type</literal></entry>
5525 <entry><type>character_data</type></entry>
5527 Type of the table: <literal>BASE TABLE</literal> for a
5528 persistent base table (the normal table type),
5529 <literal>VIEW</literal> for a view, <literal>FOREIGN</literal>
5530 for a foreign table, or
5531 <literal>LOCAL TEMPORARY</literal> for a temporary table
5536 <entry><literal>self_referencing_column_name</literal></entry>
5537 <entry><type>sql_identifier</type></entry>
5538 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
5542 <entry><literal>reference_generation</literal></entry>
5543 <entry><type>character_data</type></entry>
5544 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
5548 <entry><literal>user_defined_type_catalog</literal></entry>
5549 <entry><type>sql_identifier</type></entry>
5551 If the table is a typed table, the name of the database that
5552 contains the underlying data type (always the current
5553 database), else null.
5558 <entry><literal>user_defined_type_schema</literal></entry>
5559 <entry><type>sql_identifier</type></entry>
5561 If the table is a typed table, the name of the schema that
5562 contains the underlying data type, else null.
5567 <entry><literal>user_defined_type_name</literal></entry>
5568 <entry><type>sql_identifier</type></entry>
5570 If the table is a typed table, the name of the underlying data
5576 <entry><literal>is_insertable_into</literal></entry>
5577 <entry><type>yes_or_no</type></entry>
5579 <literal>YES</literal> if the table is insertable into,
5580 <literal>NO</literal> if not (Base tables are always insertable
5581 into, views not necessarily.)
5586 <entry><literal>is_typed</literal></entry>
5587 <entry><type>yes_or_no</type></entry>
5588 <entry><literal>YES</literal> if the table is a typed table, <literal>NO</literal> if not</entry>
5592 <entry><literal>commit_action</literal></entry>
5593 <entry><type>character_data</type></entry>
5594 <entry>Not yet implemented</entry>
5601 <sect1 id="infoschema-transforms">
5602 <title><literal>transforms</literal></title>
5605 The view <literal>transforms</literal> contains information about the
5606 transforms defined in the current database. More precisely, it contains a
5607 row for each function contained in a transform (the <quote>from SQL</quote>
5608 or <quote>to SQL</quote> function).
5612 <title><literal>transforms</literal> Columns</title>
5618 <entry>Data Type</entry>
5619 <entry>Description</entry>
5625 <entry><literal>udt_catalog</literal></entry>
5626 <entry><type>sql_identifier</type></entry>
5627 <entry>Name of the database that contains the type the transform is for (always the current database)</entry>
5631 <entry><literal>udt_schema</literal></entry>
5632 <entry><type>sql_identifier</type></entry>
5633 <entry>Name of the schema that contains the type the transform is for</entry>
5637 <entry><literal>udt_name</literal></entry>
5638 <entry><type>sql_identifier</type></entry>
5639 <entry>Name of the type the transform is for</entry>
5643 <entry><literal>specific_catalog</literal></entry>
5644 <entry><literal>sql_identifier</literal></entry>
5645 <entry>Name of the database containing the function (always the current database)</entry>
5649 <entry><literal>specific_schema</literal></entry>
5650 <entry><literal>sql_identifier</literal></entry>
5651 <entry>Name of the schema containing the function</entry>
5655 <entry><literal>specific_name</literal></entry>
5656 <entry><literal>sql_identifier</literal></entry>
5658 The <quote>specific name</quote> of the function. See <xref
5659 linkend="infoschema-routines"/> for more information.
5664 <entry><literal>group_name</literal></entry>
5665 <entry><literal>sql_identifier</literal></entry>
5667 The SQL standard allows defining transforms in <quote>groups</quote>,
5668 and selecting a group at run time. PostgreSQL does not support this.
5669 Instead, transforms are specific to a language. As a compromise, this
5670 field contains the language the transform is for.
5675 <entry><literal>transform_type</literal></entry>
5676 <entry><type>character_data</type></entry>
5678 <literal>FROM SQL</literal> or <literal>TO SQL</literal>
5686 <sect1 id="infoschema-triggered-update-columns">
5687 <title><literal>triggered_update_columns</literal></title>
5690 For triggers in the current database that specify a column list
5691 (like <literal>UPDATE OF column1, column2</literal>), the
5692 view <literal>triggered_update_columns</literal> identifies these
5693 columns. Triggers that do not specify a column list are not
5694 included in this view. Only those columns are shown that the
5695 current user owns or has some privilege other than
5696 <literal>SELECT</literal> on.
5700 <title><literal>triggered_update_columns</literal> Columns</title>
5706 <entry>Data Type</entry>
5707 <entry>Description</entry>
5713 <entry><literal>trigger_catalog</literal></entry>
5714 <entry><type>sql_identifier</type></entry>
5715 <entry>Name of the database that contains the trigger (always the current database)</entry>
5719 <entry><literal>trigger_schema</literal></entry>
5720 <entry><type>sql_identifier</type></entry>
5721 <entry>Name of the schema that contains the trigger</entry>
5725 <entry><literal>trigger_name</literal></entry>
5726 <entry><type>sql_identifier</type></entry>
5727 <entry>Name of the trigger</entry>
5731 <entry><literal>event_object_catalog</literal></entry>
5732 <entry><type>sql_identifier</type></entry>
5734 Name of the database that contains the table that the trigger
5735 is defined on (always the current database)
5740 <entry><literal>event_object_schema</literal></entry>
5741 <entry><type>sql_identifier</type></entry>
5742 <entry>Name of the schema that contains the table that the trigger is defined on</entry>
5746 <entry><literal>event_object_table</literal></entry>
5747 <entry><type>sql_identifier</type></entry>
5748 <entry>Name of the table that the trigger is defined on</entry>
5752 <entry><literal>event_object_column</literal></entry>
5753 <entry><type>sql_identifier</type></entry>
5754 <entry>Name of the column that the trigger is defined on</entry>
5761 <sect1 id="infoschema-triggers">
5762 <title><literal>triggers</literal></title>
5765 The view <literal>triggers</literal> contains all triggers defined
5766 in the current database on tables and views that the current user owns
5767 or has some privilege other than <literal>SELECT</literal> on.
5771 <title><literal>triggers</literal> Columns</title>
5777 <entry>Data Type</entry>
5778 <entry>Description</entry>
5784 <entry><literal>trigger_catalog</literal></entry>
5785 <entry><type>sql_identifier</type></entry>
5786 <entry>Name of the database that contains the trigger (always the current database)</entry>
5790 <entry><literal>trigger_schema</literal></entry>
5791 <entry><type>sql_identifier</type></entry>
5792 <entry>Name of the schema that contains the trigger</entry>
5796 <entry><literal>trigger_name</literal></entry>
5797 <entry><type>sql_identifier</type></entry>
5798 <entry>Name of the trigger</entry>
5802 <entry><literal>event_manipulation</literal></entry>
5803 <entry><type>character_data</type></entry>
5805 Event that fires the trigger (<literal>INSERT</literal>,
5806 <literal>UPDATE</literal>, or <literal>DELETE</literal>)
5811 <entry><literal>event_object_catalog</literal></entry>
5812 <entry><type>sql_identifier</type></entry>
5814 Name of the database that contains the table that the trigger
5815 is defined on (always the current database)
5820 <entry><literal>event_object_schema</literal></entry>
5821 <entry><type>sql_identifier</type></entry>
5822 <entry>Name of the schema that contains the table that the trigger is defined on</entry>
5826 <entry><literal>event_object_table</literal></entry>
5827 <entry><type>sql_identifier</type></entry>
5828 <entry>Name of the table that the trigger is defined on</entry>
5832 <entry><literal>action_order</literal></entry>
5833 <entry><type>cardinal_number</type></entry>
5835 Firing order among triggers on the same table having the same
5836 <literal>event_manipulation</literal>,
5837 <literal>action_timing</literal>, and
5838 <literal>action_orientation</literal>. In
5839 <productname>PostgreSQL</productname>, triggers are fired in name
5840 order, so this column reflects that.
5845 <entry><literal>action_condition</literal></entry>
5846 <entry><type>character_data</type></entry>
5848 <literal>WHEN</literal> condition of the trigger, null if none
5849 (also null if the table is not owned by a currently enabled
5855 <entry><literal>action_statement</literal></entry>
5856 <entry><type>character_data</type></entry>
5858 Statement that is executed by the trigger (currently always
5859 <literal>EXECUTE FUNCTION
5860 <replaceable>function</replaceable>(...)</literal>)
5865 <entry><literal>action_orientation</literal></entry>
5866 <entry><type>character_data</type></entry>
5868 Identifies whether the trigger fires once for each processed
5869 row or once for each statement (<literal>ROW</literal> or
5870 <literal>STATEMENT</literal>)
5875 <entry><literal>action_timing</literal></entry>
5876 <entry><type>character_data</type></entry>
5878 Time at which the trigger fires (<literal>BEFORE</literal>,
5879 <literal>AFTER</literal>, or <literal>INSTEAD OF</literal>)
5884 <entry><literal>action_reference_old_table</literal></entry>
5885 <entry><type>sql_identifier</type></entry>
5886 <entry>Name of the <quote>old</quote> transition table, or null if none</entry>
5890 <entry><literal>action_reference_new_table</literal></entry>
5891 <entry><type>sql_identifier</type></entry>
5892 <entry>Name of the <quote>new</quote> transition table, or null if none</entry>
5896 <entry><literal>action_reference_old_row</literal></entry>
5897 <entry><type>sql_identifier</type></entry>
5898 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
5902 <entry><literal>action_reference_new_row</literal></entry>
5903 <entry><type>sql_identifier</type></entry>
5904 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
5908 <entry><literal>created</literal></entry>
5909 <entry><type>time_stamp</type></entry>
5910 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
5917 Triggers in <productname>PostgreSQL</productname> have two
5918 incompatibilities with the SQL standard that affect the
5919 representation in the information schema. First, trigger names are
5920 local to each table in <productname>PostgreSQL</productname>, rather
5921 than being independent schema objects. Therefore there can be duplicate
5922 trigger names defined in one schema, so long as they belong to
5923 different tables. (<literal>trigger_catalog</literal> and
5924 <literal>trigger_schema</literal> are really the values pertaining
5925 to the table that the trigger is defined on.) Second, triggers can
5926 be defined to fire on multiple events in
5927 <productname>PostgreSQL</productname> (e.g., <literal>ON INSERT OR
5928 UPDATE</literal>), whereas the SQL standard only allows one. If a
5929 trigger is defined to fire on multiple events, it is represented as
5930 multiple rows in the information schema, one for each type of
5931 event. As a consequence of these two issues, the primary key of
5932 the view <literal>triggers</literal> is really
5933 <literal>(trigger_catalog, trigger_schema, event_object_table,
5934 trigger_name, event_manipulation)</literal> instead of
5935 <literal>(trigger_catalog, trigger_schema, trigger_name)</literal>,
5936 which is what the SQL standard specifies. Nonetheless, if you
5937 define your triggers in a manner that conforms with the SQL
5938 standard (trigger names unique in the schema and only one event
5939 type per trigger), this will not affect you.
5944 Prior to <productname>PostgreSQL</productname> 9.1, this view's columns
5945 <structfield>action_timing</structfield>,
5946 <structfield>action_reference_old_table</structfield>,
5947 <structfield>action_reference_new_table</structfield>,
5948 <structfield>action_reference_old_row</structfield>, and
5949 <structfield>action_reference_new_row</structfield>
5951 <structfield>condition_timing</structfield>,
5952 <structfield>condition_reference_old_table</structfield>,
5953 <structfield>condition_reference_new_table</structfield>,
5954 <structfield>condition_reference_old_row</structfield>, and
5955 <structfield>condition_reference_new_row</structfield>
5957 That was how they were named in the SQL:1999 standard.
5958 The new naming conforms to SQL:2003 and later.
5963 <sect1 id="infoschema-udt-privileges">
5964 <title><literal>udt_privileges</literal></title>
5967 The view <literal>udt_privileges</literal> identifies
5968 <literal>USAGE</literal> privileges granted on user-defined types to a
5969 currently enabled role or by a currently enabled role. There is one row for
5970 each combination of type, grantor, and grantee. This view shows only
5971 composite types (see under <xref linkend="infoschema-user-defined-types"/>
5973 <xref linkend="infoschema-usage-privileges"/> for domain privileges.
5977 <title><literal>udt_privileges</literal> Columns</title>
5983 <entry>Data Type</entry>
5984 <entry>Description</entry>
5990 <entry><literal>grantor</literal></entry>
5991 <entry><type>sql_identifier</type></entry>
5992 <entry>Name of the role that granted the privilege</entry>
5996 <entry><literal>grantee</literal></entry>
5997 <entry><type>sql_identifier</type></entry>
5998 <entry>Name of the role that the privilege was granted to</entry>
6002 <entry><literal>udt_catalog</literal></entry>
6003 <entry><type>sql_identifier</type></entry>
6004 <entry>Name of the database containing the type (always the current database)</entry>
6008 <entry><literal>udt_schema</literal></entry>
6009 <entry><type>sql_identifier</type></entry>
6010 <entry>Name of the schema containing the type</entry>
6014 <entry><literal>udt_name</literal></entry>
6015 <entry><type>sql_identifier</type></entry>
6016 <entry>Name of the type</entry>
6020 <entry><literal>privilege_type</literal></entry>
6021 <entry><type>character_data</type></entry>
6022 <entry>Always <literal>TYPE USAGE</literal></entry>
6026 <entry><literal>is_grantable</literal></entry>
6027 <entry><type>yes_or_no</type></entry>
6028 <entry><literal>YES</literal> if the privilege is grantable, <literal>NO</literal> if not</entry>
6035 <sect1 id="infoschema-usage-privileges">
6036 <title><literal>usage_privileges</literal></title>
6039 The view <literal>usage_privileges</literal> identifies
6040 <literal>USAGE</literal> privileges granted on various kinds of
6041 objects to a currently enabled role or by a currently enabled role.
6042 In <productname>PostgreSQL</productname>, this currently applies to
6043 collations, domains, foreign-data wrappers, foreign servers, and sequences. There is one
6044 row for each combination of object, grantor, and grantee.
6048 Since collations do not have real privileges
6049 in <productname>PostgreSQL</productname>, this view shows implicit
6050 non-grantable <literal>USAGE</literal> privileges granted by the
6051 owner to <literal>PUBLIC</literal> for all collations. The other
6052 object types, however, show real privileges.
6056 In PostgreSQL, sequences also support <literal>SELECT</literal>
6057 and <literal>UPDATE</literal> privileges in addition to
6058 the <literal>USAGE</literal> privilege. These are nonstandard and therefore
6059 not visible in the information schema.
6063 <title><literal>usage_privileges</literal> Columns</title>
6069 <entry>Data Type</entry>
6070 <entry>Description</entry>
6076 <entry><literal>grantor</literal></entry>
6077 <entry><type>sql_identifier</type></entry>
6078 <entry>Name of the role that granted the privilege</entry>
6082 <entry><literal>grantee</literal></entry>
6083 <entry><type>sql_identifier</type></entry>
6084 <entry>Name of the role that the privilege was granted to</entry>
6088 <entry><literal>object_catalog</literal></entry>
6089 <entry><type>sql_identifier</type></entry>
6090 <entry>Name of the database containing the object (always the current database)</entry>
6094 <entry><literal>object_schema</literal></entry>
6095 <entry><type>sql_identifier</type></entry>
6096 <entry>Name of the schema containing the object, if applicable,
6097 else an empty string</entry>
6101 <entry><literal>object_name</literal></entry>
6102 <entry><type>sql_identifier</type></entry>
6103 <entry>Name of the object</entry>
6107 <entry><literal>object_type</literal></entry>
6108 <entry><type>character_data</type></entry>
6109 <entry><literal>COLLATION</literal> or <literal>DOMAIN</literal> or <literal>FOREIGN DATA WRAPPER</literal> or <literal>FOREIGN SERVER</literal> or <literal>SEQUENCE</literal></entry>
6113 <entry><literal>privilege_type</literal></entry>
6114 <entry><type>character_data</type></entry>
6115 <entry>Always <literal>USAGE</literal></entry>
6119 <entry><literal>is_grantable</literal></entry>
6120 <entry><type>yes_or_no</type></entry>
6121 <entry><literal>YES</literal> if the privilege is grantable, <literal>NO</literal> if not</entry>
6128 <sect1 id="infoschema-user-defined-types">
6129 <title><literal>user_defined_types</literal></title>
6132 The view <literal>user_defined_types</literal> currently contains
6133 all composite types defined in the current database.
6134 Only those types are shown that the current user has access to (by way
6135 of being the owner or having some privilege).
6139 SQL knows about two kinds of user-defined types: structured types
6140 (also known as composite types
6141 in <productname>PostgreSQL</productname>) and distinct types (not
6142 implemented in <productname>PostgreSQL</productname>). To be
6143 future-proof, use the
6144 column <literal>user_defined_type_category</literal> to
6145 differentiate between these. Other user-defined types such as base
6146 types and enums, which are <productname>PostgreSQL</productname>
6147 extensions, are not shown here. For domains,
6148 see <xref linkend="infoschema-domains"/> instead.
6152 <title><literal>user_defined_types</literal> Columns</title>
6158 <entry>Data Type</entry>
6159 <entry>Description</entry>
6165 <entry><literal>user_defined_type_catalog</literal></entry>
6166 <entry><type>sql_identifier</type></entry>
6167 <entry>Name of the database that contains the type (always the current database)</entry>
6171 <entry><literal>user_defined_type_schema</literal></entry>
6172 <entry><type>sql_identifier</type></entry>
6173 <entry>Name of the schema that contains the type</entry>
6177 <entry><literal>user_defined_type_name</literal></entry>
6178 <entry><type>sql_identifier</type></entry>
6179 <entry>Name of the type</entry>
6183 <entry><literal>user_defined_type_category</literal></entry>
6184 <entry><type>character_data</type></entry>
6186 Currently always <literal>STRUCTURED</literal>
6191 <entry><literal>is_instantiable</literal></entry>
6192 <entry><type>yes_or_no</type></entry>
6193 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6197 <entry><literal>is_final</literal></entry>
6198 <entry><type>yes_or_no</type></entry>
6199 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6203 <entry><literal>ordering_form</literal></entry>
6204 <entry><type>character_data</type></entry>
6205 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6209 <entry><literal>ordering_category</literal></entry>
6210 <entry><type>character_data</type></entry>
6211 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6215 <entry><literal>ordering_routine_catalog</literal></entry>
6216 <entry><type>sql_identifier</type></entry>
6217 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6221 <entry><literal>ordering_routine_schema</literal></entry>
6222 <entry><type>sql_identifier</type></entry>
6223 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6227 <entry><literal>ordering_routine_name</literal></entry>
6228 <entry><type>sql_identifier</type></entry>
6229 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6233 <entry><literal>reference_type</literal></entry>
6234 <entry><type>character_data</type></entry>
6235 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6239 <entry><literal>data_type</literal></entry>
6240 <entry><type>character_data</type></entry>
6241 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6245 <entry><literal>character_maximum_length</literal></entry>
6246 <entry><type>cardinal_number</type></entry>
6247 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6251 <entry><literal>character_octet_length</literal></entry>
6252 <entry><type>cardinal_number</type></entry>
6253 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6257 <entry><literal>character_set_catalog</literal></entry>
6258 <entry><type>sql_identifier</type></entry>
6259 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6263 <entry><literal>character_set_schema</literal></entry>
6264 <entry><type>sql_identifier</type></entry>
6265 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6269 <entry><literal>character_set_name</literal></entry>
6270 <entry><type>sql_identifier</type></entry>
6271 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6275 <entry><literal>collation_catalog</literal></entry>
6276 <entry><type>sql_identifier</type></entry>
6277 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6281 <entry><literal>collation_schema</literal></entry>
6282 <entry><type>sql_identifier</type></entry>
6283 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6287 <entry><literal>collation_name</literal></entry>
6288 <entry><type>sql_identifier</type></entry>
6289 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6293 <entry><literal>numeric_precision</literal></entry>
6294 <entry><type>cardinal_number</type></entry>
6295 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6299 <entry><literal>numeric_precision_radix</literal></entry>
6300 <entry><type>cardinal_number</type></entry>
6301 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6305 <entry><literal>numeric_scale</literal></entry>
6306 <entry><type>cardinal_number</type></entry>
6307 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6311 <entry><literal>datetime_precision</literal></entry>
6312 <entry><type>cardinal_number</type></entry>
6313 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6317 <entry><literal>interval_type</literal></entry>
6318 <entry><type>character_data</type></entry>
6319 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6323 <entry><literal>interval_precision</literal></entry>
6324 <entry><type>cardinal_number</type></entry>
6325 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6329 <entry><literal>source_dtd_identifier</literal></entry>
6330 <entry><type>sql_identifier</type></entry>
6331 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6335 <entry><literal>ref_dtd_identifier</literal></entry>
6336 <entry><type>sql_identifier</type></entry>
6337 <entry>Applies to a feature not available in <productname>PostgreSQL</productname></entry>
6344 <sect1 id="infoschema-user-mapping-options">
6345 <title><literal>user_mapping_options</literal></title>
6348 The view <literal>user_mapping_options</literal> contains all the
6349 options defined for user mappings in the current database. Only
6350 those user mappings are shown where the current user has access to
6351 the corresponding foreign server (by way of being the owner or
6352 having some privilege).
6356 <title><literal>user_mapping_options</literal> Columns</title>
6362 <entry>Data Type</entry>
6363 <entry>Description</entry>
6369 <entry><literal>authorization_identifier</literal></entry>
6370 <entry><type>sql_identifier</type></entry>
6371 <entry>Name of the user being mapped,
6372 or <literal>PUBLIC</literal> if the mapping is public</entry>
6376 <entry><literal>foreign_server_catalog</literal></entry>
6377 <entry><type>sql_identifier</type></entry>
6378 <entry>Name of the database that the foreign server used by this
6379 mapping is defined in (always the current database)</entry>
6383 <entry><literal>foreign_server_name</literal></entry>
6384 <entry><type>sql_identifier</type></entry>
6385 <entry>Name of the foreign server used by this mapping</entry>
6389 <entry><literal>option_name</literal></entry>
6390 <entry><type>sql_identifier</type></entry>
6391 <entry>Name of an option</entry>
6395 <entry><literal>option_value</literal></entry>
6396 <entry><type>character_data</type></entry>
6397 <entry>Value of the option. This column will show as null
6398 unless the current user is the user being mapped, or the mapping
6399 is for <literal>PUBLIC</literal> and the current user is the
6400 server owner, or the current user is a superuser. The intent is
6401 to protect password information stored as user mapping
6409 <sect1 id="infoschema-user-mappings">
6410 <title><literal>user_mappings</literal></title>
6413 The view <literal>user_mappings</literal> contains all user
6414 mappings defined in the current database. Only those user mappings
6415 are shown where the current user has access to the corresponding
6416 foreign server (by way of being the owner or having some
6421 <title><literal>user_mappings</literal> Columns</title>
6427 <entry>Data Type</entry>
6428 <entry>Description</entry>
6434 <entry><literal>authorization_identifier</literal></entry>
6435 <entry><type>sql_identifier</type></entry>
6436 <entry>Name of the user being mapped,
6437 or <literal>PUBLIC</literal> if the mapping is public</entry>
6441 <entry><literal>foreign_server_catalog</literal></entry>
6442 <entry><type>sql_identifier</type></entry>
6443 <entry>Name of the database that the foreign server used by this
6444 mapping is defined in (always the current database)</entry>
6448 <entry><literal>foreign_server_name</literal></entry>
6449 <entry><type>sql_identifier</type></entry>
6450 <entry>Name of the foreign server used by this mapping</entry>
6457 <sect1 id="infoschema-view-column-usage">
6458 <title><literal>view_column_usage</literal></title>
6461 The view <literal>view_column_usage</literal> identifies all
6462 columns that are used in the query expression of a view (the
6463 <command>SELECT</command> statement that defines the view). A
6464 column is only included if the table that contains the column is
6465 owned by a currently enabled role.
6470 Columns of system tables are not included. This should be fixed
6476 <title><literal>view_column_usage</literal> Columns</title>
6482 <entry>Data Type</entry>
6483 <entry>Description</entry>
6489 <entry><literal>view_catalog</literal></entry>
6490 <entry><type>sql_identifier</type></entry>
6491 <entry>Name of the database that contains the view (always the current database)</entry>
6495 <entry><literal>view_schema</literal></entry>
6496 <entry><type>sql_identifier</type></entry>
6497 <entry>Name of the schema that contains the view</entry>
6501 <entry><literal>view_name</literal></entry>
6502 <entry><type>sql_identifier</type></entry>
6503 <entry>Name of the view</entry>
6507 <entry><literal>table_catalog</literal></entry>
6508 <entry><type>sql_identifier</type></entry>
6510 Name of the database that contains the table that contains the
6511 column that is used by the view (always the current database)
6516 <entry><literal>table_schema</literal></entry>
6517 <entry><type>sql_identifier</type></entry>
6519 Name of the schema that contains the table that contains the
6520 column that is used by the view
6525 <entry><literal>table_name</literal></entry>
6526 <entry><type>sql_identifier</type></entry>
6528 Name of the table that contains the column that is used by the
6534 <entry><literal>column_name</literal></entry>
6535 <entry><type>sql_identifier</type></entry>
6536 <entry>Name of the column that is used by the view</entry>
6543 <sect1 id="infoschema-view-routine-usage">
6544 <title><literal>view_routine_usage</literal></title>
6547 The view <literal>view_routine_usage</literal> identifies all
6548 routines (functions and procedures) that are used in the query
6549 expression of a view (the <command>SELECT</command> statement that
6550 defines the view). A routine is only included if that routine is
6551 owned by a currently enabled role.
6555 <title><literal>view_routine_usage</literal> Columns</title>
6561 <entry>Data Type</entry>
6562 <entry>Description</entry>
6568 <entry><literal>table_catalog</literal></entry>
6569 <entry><literal>sql_identifier</literal></entry>
6570 <entry>Name of the database containing the view (always the current database)</entry>
6574 <entry><literal>table_schema</literal></entry>
6575 <entry><literal>sql_identifier</literal></entry>
6576 <entry>Name of the schema containing the view</entry>
6580 <entry><literal>table_name</literal></entry>
6581 <entry><literal>sql_identifier</literal></entry>
6582 <entry>Name of the view</entry>
6586 <entry><literal>specific_catalog</literal></entry>
6587 <entry><literal>sql_identifier</literal></entry>
6588 <entry>Name of the database containing the function (always the current database)</entry>
6592 <entry><literal>specific_schema</literal></entry>
6593 <entry><literal>sql_identifier</literal></entry>
6594 <entry>Name of the schema containing the function</entry>
6598 <entry><literal>specific_name</literal></entry>
6599 <entry><literal>sql_identifier</literal></entry>
6601 The <quote>specific name</quote> of the function. See <xref
6602 linkend="infoschema-routines"/> for more information.
6610 <sect1 id="infoschema-view-table-usage">
6611 <title><literal>view_table_usage</literal></title>
6614 The view <literal>view_table_usage</literal> identifies all tables
6615 that are used in the query expression of a view (the
6616 <command>SELECT</command> statement that defines the view). A
6617 table is only included if that table is owned by a currently
6623 System tables are not included. This should be fixed sometime.
6628 <title><literal>view_table_usage</literal> Columns</title>
6634 <entry>Data Type</entry>
6635 <entry>Description</entry>
6641 <entry><literal>view_catalog</literal></entry>
6642 <entry><type>sql_identifier</type></entry>
6643 <entry>Name of the database that contains the view (always the current database)</entry>
6647 <entry><literal>view_schema</literal></entry>
6648 <entry><type>sql_identifier</type></entry>
6649 <entry>Name of the schema that contains the view</entry>
6653 <entry><literal>view_name</literal></entry>
6654 <entry><type>sql_identifier</type></entry>
6655 <entry>Name of the view</entry>
6659 <entry><literal>table_catalog</literal></entry>
6660 <entry><type>sql_identifier</type></entry>
6662 Name of the database that contains the table that is
6663 used by the view (always the current database)
6668 <entry><literal>table_schema</literal></entry>
6669 <entry><type>sql_identifier</type></entry>
6671 Name of the schema that contains the table that is used by the
6677 <entry><literal>table_name</literal></entry>
6678 <entry><type>sql_identifier</type></entry>
6680 Name of the table that is used by the view
6688 <sect1 id="infoschema-views">
6689 <title><literal>views</literal></title>
6692 The view <literal>views</literal> contains all views defined in the
6693 current database. Only those views are shown that the current user
6694 has access to (by way of being the owner or having some privilege).
6698 <title><literal>views</literal> Columns</title>
6704 <entry>Data Type</entry>
6705 <entry>Description</entry>
6711 <entry><literal>table_catalog</literal></entry>
6712 <entry><type>sql_identifier</type></entry>
6713 <entry>Name of the database that contains the view (always the current database)</entry>
6717 <entry><literal>table_schema</literal></entry>
6718 <entry><type>sql_identifier</type></entry>
6719 <entry>Name of the schema that contains the view</entry>
6723 <entry><literal>table_name</literal></entry>
6724 <entry><type>sql_identifier</type></entry>
6725 <entry>Name of the view</entry>
6729 <entry><literal>view_definition</literal></entry>
6730 <entry><type>character_data</type></entry>
6732 Query expression defining the view (null if the view is not
6733 owned by a currently enabled role)
6738 <entry><literal>check_option</literal></entry>
6739 <entry><type>character_data</type></entry>
6741 <literal>CASCADED</literal> or <literal>LOCAL</literal> if the view
6742 has a <literal>CHECK OPTION</literal> defined on it,
6743 <literal>NONE</literal> if not
6748 <entry><literal>is_updatable</literal></entry>
6749 <entry><type>yes_or_no</type></entry>
6751 <literal>YES</literal> if the view is updatable (allows
6752 <command>UPDATE</command> and <command>DELETE</command>),
6753 <literal>NO</literal> if not
6758 <entry><literal>is_insertable_into</literal></entry>
6759 <entry><type>yes_or_no</type></entry>
6761 <literal>YES</literal> if the view is insertable into (allows
6762 <command>INSERT</command>), <literal>NO</literal> if not
6767 <entry><literal>is_trigger_updatable</literal></entry>
6768 <entry><type>yes_or_no</type></entry>
6770 <literal>YES</literal> if the view has an <literal>INSTEAD OF</literal>
6771 <command>UPDATE</command> trigger defined on it, <literal>NO</literal> if not
6776 <entry><literal>is_trigger_deletable</literal></entry>
6777 <entry><type>yes_or_no</type></entry>
6779 <literal>YES</literal> if the view has an <literal>INSTEAD OF</literal>
6780 <command>DELETE</command> trigger defined on it, <literal>NO</literal> if not
6785 <entry><literal>is_trigger_insertable_into</literal></entry>
6786 <entry><type>yes_or_no</type></entry>
6788 <literal>YES</literal> if the view has an <literal>INSTEAD OF</literal>
6789 <command>INSERT</command> trigger defined on it, <literal>NO</literal> if not