</row>
<row>
- <entry><link linkend="catalog-pg-pltemplate"><structname>pg_pltemplate</structname></link></entry>
- <entry>template data for procedural languages</entry>
+ <entry><link linkend="catalog-pg-partitioned-table"><structname>pg_partitioned_table</structname></link></entry>
+ <entry>information about partition key of tables</entry>
</row>
<row>
- <entry><link linkend="catalog-pg-partitioned-table"><structname>pg_partitioned_table</structname></link></entry>
- <entry>information about partition key of tables</entry>
+ <entry><link linkend="catalog-pg-pltemplate"><structname>pg_pltemplate</structname></link></entry>
+ <entry>template data for procedural languages</entry>
</row>
<row>
<entry>functions and procedures</entry>
</row>
+ <row>
+ <entry><link linkend="catalog-pg-publication"><structname>pg_publication</structname></link></entry>
+ <entry>publications for logical replication</entry>
+ </row>
+
+ <row>
+ <entry><link linkend="catalog-pg-publication-rel"><structname>pg_publication_rel</structname></link></entry>
+ <entry>relation to publication mapping</entry>
+ </row>
+
<row>
<entry><link linkend="catalog-pg-range"><structname>pg_range</structname></link></entry>
<entry>information about range types</entry>
<entry>security labels on database objects</entry>
</row>
+ <row>
+ <entry><link linkend="catalog-pg-sequence"><structname>pg_sequence</structname></link></entry>
+ <entry>information about sequences</entry>
+ </row>
+
<row>
<entry><link linkend="catalog-pg-shdepend"><structname>pg_shdepend</structname></link></entry>
<entry>dependencies on shared objects</entry>
<entry>planner statistics</entry>
</row>
+ <row>
+ <entry><link linkend="catalog-pg-statistic-ext"><structname>pg_statistic_ext</structname></link></entry>
+ <entry>extended planner statistics</entry>
+ </row>
+
+ <row>
+ <entry><link linkend="catalog-pg-subscription"><structname>pg_subscription</structname></link></entry>
+ <entry>logical replication subscriptions</entry>
+ </row>
+
+ <row>
+ <entry><link linkend="catalog-pg-subscription-rel"><structname>pg_subscription_rel</structname></link></entry>
+ <entry>relation state for subscriptions</entry>
+ </row>
+
<row>
<entry><link linkend="catalog-pg-tablespace"><structname>pg_tablespace</structname></link></entry>
<entry>tablespaces within this database cluster</entry>
</entry>
</row>
+ <row>
+ <entry><structfield>attidentity</structfield></entry>
+ <entry><type>char</type></entry>
+ <entry></entry>
+ <entry>
+ If a zero byte (<literal>''</literal>), then not an identity column.
+ Otherwise, <literal>a</literal> = generated
+ always, <literal>d</literal> = generated by default.
+ </entry>
+ </row>
+
<row>
<entry><structfield>attisdropped</structfield></entry>
<entry><type>bool</type></entry>
<entry><structfield>rolpassword</structfield></entry>
<entry><type>text</type></entry>
<entry>
- Password (possibly encrypted); null if none. If the password
- is encrypted, this column will begin with the string <literal>md5</>
- followed by a 32-character hexadecimal MD5 hash. The MD5 hash
- will be of the user's password concatenated to their user name.
- For example, if user <literal>joe</> has password <literal>xyzzy</>,
- <productname>PostgreSQL</> will store the md5 hash of
- <literal>xyzzyjoe</>. A password that does not follow that
- format is assumed to be unencrypted.
+ Password (possibly encrypted); null if none. The format depends
+ on the form of encryption used.
</entry>
</row>
</tgroup>
</table>
+ <para>
+ For an MD5 encrypted password, <structfield>rolpassword</structfield>
+ column will begin with the string <literal>md5</> followed by a
+ 32-character hexadecimal MD5 hash. The MD5 hash will be of the user's
+ password concatenated to their user name. For example, if user
+ <literal>joe</> has password <literal>xyzzy</>, <productname>PostgreSQL</>
+ will store the md5 hash of <literal>xyzzyjoe</>.
+ </para>
+
+ <para>
+ If the password is encrypted with SCRAM-SHA-256, it has the format:
+<synopsis>
+SCRAM-SHA-256$<replaceable><iteration count></>:<replaceable><salt></>$<replaceable><StoredKey></>:<replaceable><ServerKey></>
+</synopsis>
+ where <replaceable>salt</>, <replaceable>StoredKey</> and
+ <replaceable>ServerKey</> are in Base64 encoded format. This format is
+ the same as that specified by RFC 5803.
+ </para>
+
+ <para>
+ A password that does not follow either of those formats is assumed to be
+ unencrypted.
+ </para>
</sect1>
The catalog <structname>pg_class</structname> catalogs tables and most
everything else that has columns or is otherwise similar to a
table. This includes indexes (but see also
- <structname>pg_index</structname>), sequences, views, materialized
+ <structname>pg_index</structname>), sequences (but see also
+ <structname>pg_sequence</structname>), views, materialized
views, composite types, and TOAST tables; see <structfield>relkind</>.
Below, when we mean all of these
kinds of objects we speak of <quote>relations</quote>. Not all
<entry><type>char</type></entry>
<entry></entry>
<entry>
- <literal>r</> = ordinary table, <literal>P</> = partitioned table,
- <literal>i</> = index
- <literal>S</> = sequence, <literal>v</> = view,
+ <literal>r</> = ordinary table,
+ <literal>i</> = index,
+ <literal>S</> = sequence,
+ <literal>t</> = TOAST table,
+ <literal>v</> = view,
<literal>m</> = materialized view,
- <literal>c</> = composite type, <literal>t</> = TOAST table,
- <literal>f</> = foreign table
+ <literal>c</> = composite type,
+ <literal>f</> = foreign table,
+ <literal>p</> = partitioned table
</entry>
</row>
All transaction IDs before this one have been replaced with a permanent
(<quote>frozen</>) transaction ID in this table. This is used to track
whether the table needs to be vacuumed in order to prevent transaction
- ID wraparound or to allow <literal>pg_clog</> to be shrunk. Zero
+ ID wraparound or to allow <literal>pg_xact</> to be shrunk. Zero
(<symbol>InvalidTransactionId</symbol>) if the relation is not a table.
</entry>
</row>
<entry>Owner of the collation</entry>
</row>
+ <row>
+ <entry><structfield>collprovider</structfield></entry>
+ <entry><type>char</type></entry>
+ <entry></entry>
+ <entry>Provider of the collation: <literal>d</literal> = database
+ default, <literal>c</literal> = libc, <literal>i</literal> = icu</entry>
+ </row>
+
<row>
<entry><structfield>collencoding</structfield></entry>
<entry><type>int4</type></entry>
<entry></entry>
<entry><symbol>LC_CTYPE</> for this collation object</entry>
</row>
+
+ <row>
+ <entry><structfield>collversion</structfield></entry>
+ <entry><type>text</type></entry>
+ <entry></entry>
+ <entry>
+ Provider-specific version of the collation. This is recorded when the
+ collation is created and then checked when it is used, to detect
+ changes in the collation definition that could lead to data corruption.
+ </entry>
+ </row>
</tbody>
</tgroup>
</table>
All transaction IDs before this one have been replaced with a permanent
(<quote>frozen</>) transaction ID in this database. This is used to
track whether the database needs to be vacuumed in order to prevent
- transaction ID wraparound or to allow <literal>pg_clog</> to be shrunk.
+ transaction ID wraparound or to allow <literal>pg_xact</> to be shrunk.
It is the minimum of the per-table
<structname>pg_class</>.<structfield>relfrozenxid</> values.
</entry>
<entry><literal><link linkend="catalog-pg-collation"><structname>pg_collation</structname></link>.oid</literal></entry>
<entry>
For each column in the index key, this contains the OID of the
- collation to use for the index.
+ collation to use for the index, or zero if the column is not
+ of a collatable data type.
</entry>
</row>
</table>
</sect1>
+
<sect1 id="catalog-pg-namespace">
<title><structname>pg_namespace</structname></title>
</sect1>
+ <sect1 id="catalog-pg-partitioned-table">
+ <title><structname>pg_partitioned_table</structname></title>
+
+ <indexterm zone="catalog-pg-partitioned-table">
+ <primary>pg_partitioned_table</primary>
+ </indexterm>
+
+ <para>
+ The catalog <structname>pg_partitioned_table</structname> stores
+ information about how tables are partitioned.
+ </para>
+
+ <table>
+ <title><structname>pg_partitioned_table</> Columns</title>
+
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>References</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry><structfield>partrelid</structfield></entry>
+ <entry><type>oid</type></entry>
+ <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry>
+ <entry>The OID of the <structname>pg_class</> entry for this partitioned table</entry>
+ </row>
+
+ <row>
+ <entry><structfield>partstrat</structfield></entry>
+ <entry><type>char</type></entry>
+ <entry></entry>
+ <entry>
+ Partitioning strategy; <literal>l</> = list partitioned table,
+ <literal>r</> = range partitioned table
+ </entry>
+ </row>
+
+ <row>
+ <entry><structfield>partnatts</structfield></entry>
+ <entry><type>int2</type></entry>
+ <entry></entry>
+ <entry>The number of columns in partition key</entry>
+ </row>
+
+ <row>
+ <entry><structfield>partattrs</structfield></entry>
+ <entry><type>int2vector</type></entry>
+ <entry><literal><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</literal></entry>
+ <entry>
+ This is an array of <structfield>partnatts</structfield> values that
+ indicate which table columns are part of the partition key. For
+ example, a value of <literal>1 3</literal> would mean that the first
+ and the third table columns make up the partition key. A zero in this
+ array indicates that the corresponding partition key column is an
+ expression, rather than a simple column reference.
+ </entry>
+ </row>
+
+ <row>
+ <entry><structfield>partclass</structfield></entry>
+ <entry><type>oidvector</type></entry>
+ <entry><literal><link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link>.oid</literal></entry>
+ <entry>
+ For each column in the partition key, this contains the OID of the
+ operator class to use. See
+ <link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link> for details.
+ </entry>
+ </row>
+
+ <row>
+ <entry><structfield>partcollation</structfield></entry>
+ <entry><type>oidvector</type></entry>
+ <entry><literal><link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link>.oid</literal></entry>
+ <entry>
+ For each column in the partition key, this contains the OID of the
+ collation to use for partitioning, or zero if the column is not
+ of a collatable data type.
+ </entry>
+ </row>
+
+ <row>
+ <entry><structfield>partexprs</structfield></entry>
+ <entry><type>pg_node_tree</type></entry>
+ <entry></entry>
+ <entry>
+ Expression trees (in <function>nodeToString()</function>
+ representation) for partition key columns that are not simple column
+ references. This is a list with one element for each zero
+ entry in <structfield>partattrs</>. Null if all partition key columns
+ are simple references.
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+ </sect1>
+
+
<sect1 id="catalog-pg-pltemplate">
<title><structname>pg_pltemplate</structname></title>
</sect1>
- <sect1 id="catalog-pg-partitioned-table">
- <title><structname>pg_partitioned_table</structname></title>
- <indexterm zone="catalog-pg-partitioned-table">
- <primary>pg_partitioned_table</primary>
+ <sect1 id="catalog-pg-policy">
+ <title><structname>pg_policy</structname></title>
+
+ <indexterm zone="catalog-pg-policy">
+ <primary>pg_policy</primary>
</indexterm>
<para>
- The catalog <structname>pg_partitioned_table</structname> stores
- information about how tables are partitioned.
+ The catalog <structname>pg_policy</structname> stores row level
+ security policies for tables. A policy includes the kind of
+ command that it applies to (possibly all commands), the roles that it
+ applies to, the expression to be added as a security-barrier
+ qualification to queries that include the table, and the expression
+ to be added as a <literal>WITH CHECK</> option for queries that attempt to
+ add new records to the table.
</para>
<table>
- <title><structname>pg_partitioned_table</> Columns</title>
+
+ <title><structname>pg_policy</structname> Columns</title>
<tgroup cols="4">
<thead>
</thead>
<tbody>
+ <row>
+ <entry><structfield>polname</structfield></entry>
+ <entry><type>name</type></entry>
+ <entry></entry>
+ <entry>The name of the policy</entry>
+ </row>
<row>
- <entry><structfield>partrelid</structfield></entry>
+ <entry><structfield>polrelid</structfield></entry>
<entry><type>oid</type></entry>
<entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry>
- <entry>The OID of the <structname>pg_class</> entry for this partitioned table</entry>
+ <entry>The table to which the policy applies</entry>
</row>
<row>
- <entry><structfield>partstrat</structfield></entry>
+ <entry><structfield>polcmd</structfield></entry>
<entry><type>char</type></entry>
<entry></entry>
- <entry>
- Partitioning strategy; <literal>l</> = list partitioned table,
- <literal>r</> = range partitioned table
- </entry>
+ <entry>The command type to which the policy is applied:
+ <literal>r</> for <command>SELECT</>,
+ <literal>a</> for <command>INSERT</>,
+ <literal>w</> for <command>UPDATE</>,
+ <literal>d</> for <command>DELETE</>,
+ or <literal>*</> for all</entry>
</row>
<row>
- <entry><structfield>partnatts</structfield></entry>
- <entry><type>int2</type></entry>
+ <entry><structfield>polpermissive</structfield></entry>
+ <entry><type>boolean</type></entry>
<entry></entry>
- <entry>The number of columns in partition key</entry>
- </row>
-
- <row>
- <entry><structfield>partattrs</structfield></entry>
- <entry><type>int2vector</type></entry>
- <entry><literal><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</literal></entry>
- <entry>
- This is an array of <structfield>partnatts</structfield> values that
- indicate which table columns are part of the partition key. For
- example, a value of <literal>1 3</literal> would mean that the first
- and the third table columns make up the partition key. A zero in this
- array indicates that the corresponding partition key column is an
- expression, rather than a simple column reference.
- </entry>
+ <entry>Is the policy permissive or restrictive?</entry>
</row>
<row>
- <entry><structfield>partclass</structfield></entry>
- <entry><type>oidvector</type></entry>
- <entry><literal><link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link>.oid</literal></entry>
- <entry>
- For each column in the partition key, this contains the OID of the
- operator class to use. See
- <link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link> for details.
- </entry>
+ <entry><structfield>polroles</structfield></entry>
+ <entry><type>oid[]</type></entry>
+ <entry><literal><link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.oid</literal></entry>
+ <entry>The roles to which the policy is applied</entry>
</row>
<row>
- <entry><structfield>partcollation</structfield></entry>
- <entry><type>oidvector</type></entry>
- <entry><literal><link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link>.oid</literal></entry>
- <entry>
- For each column in the partition key, this contains the OID of the
- the collation to use for partitioning.
- </entry>
+ <entry><structfield>polqual</structfield></entry>
+ <entry><type>pg_node_tree</type></entry>
+ <entry></entry>
+ <entry>The expression tree to be added to the security barrier qualifications for queries that use the table</entry>
</row>
<row>
- <entry><structfield>partexprs</structfield></entry>
+ <entry><structfield>polwithcheck</structfield></entry>
<entry><type>pg_node_tree</type></entry>
<entry></entry>
- <entry>
- Expression trees (in <function>nodeToString()</function>
- representation) for partition key columns that are not simple column
- references. This is a list with one element for each zero
- entry in <structfield>partattrs</>. Null if all partition key columns
- are simple references.
- </entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
- </sect1>
-
- <sect1 id="catalog-pg-policy">
- <title><structname>pg_policy</structname></title>
-
- <indexterm zone="catalog-pg-policy">
- <primary>pg_policy</primary>
- </indexterm>
-
- <para>
- The catalog <structname>pg_policy</structname> stores row level
- security policies for tables. A policy includes the kind of
- command that it applies to (possibly all commands), the roles that it
- applies to, the expression to be added as a security-barrier
- qualification to queries that include the table, and the expression
- to be added as a <literal>WITH CHECK</> option for queries that attempt to
- add new records to the table.
- </para>
-
- <table>
-
- <title><structname>pg_policy</structname> Columns</title>
-
- <tgroup cols="4">
- <thead>
- <row>
- <entry>Name</entry>
- <entry>Type</entry>
- <entry>References</entry>
- <entry>Description</entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry><structfield>polname</structfield></entry>
- <entry><type>name</type></entry>
- <entry></entry>
- <entry>The name of the policy</entry>
- </row>
-
- <row>
- <entry><structfield>polrelid</structfield></entry>
- <entry><type>oid</type></entry>
- <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry>
- <entry>The table to which the policy applies</entry>
- </row>
-
- <row>
- <entry><structfield>polcmd</structfield></entry>
- <entry><type>char</type></entry>
- <entry></entry>
- <entry>The command type to which the policy is applied:
- <literal>r</> for <command>SELECT</>,
- <literal>a</> for <command>INSERT</>,
- <literal>w</> for <command>UPDATE</>,
- <literal>d</> for <command>DELETE</>,
- or <literal>*</> for all</entry>
- </row>
-
- <row>
- <entry><structfield>polpermissive</structfield></entry>
- <entry><type>boolean</type></entry>
- <entry></entry>
- <entry>Is the policy permissive or restrictive?</entry>
- </row>
-
- <row>
- <entry><structfield>polroles</structfield></entry>
- <entry><type>oid[]</type></entry>
- <entry><literal><link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.oid</literal></entry>
- <entry>The roles to which the policy is applied</entry>
- </row>
-
- <row>
- <entry><structfield>polqual</structfield></entry>
- <entry><type>pg_node_tree</type></entry>
- <entry></entry>
- <entry>The expression tree to be added to the security barrier qualifications for queries that use the table</entry>
- </row>
-
- <row>
- <entry><structfield>polwithcheck</structfield></entry>
- <entry><type>pg_node_tree</type></entry>
- <entry></entry>
- <entry>The expression tree to be added to the WITH CHECK qualifications for queries that attempt to add rows to the table</entry>
+ <entry>The expression tree to be added to the WITH CHECK qualifications for queries that attempt to add rows to the table</entry>
</row>
</tbody>
</sect1>
+ <sect1 id="catalog-pg-publication">
+ <title><structname>pg_publication</structname></title>
+
+ <indexterm zone="catalog-pg-publication">
+ <primary>pg_publication</primary>
+ </indexterm>
+
+ <para>
+ The catalog <structname>pg_publication</structname> contains all
+ publications created in the database. For more on publications see
+ <xref linkend="logical-replication-publication">.
+ </para>
+
+ <table>
+ <title><structname>pg_publication</structname> Columns</title>
+
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>References</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><structfield>oid</structfield></entry>
+ <entry><type>oid</type></entry>
+ <entry></entry>
+ <entry>Row identifier (hidden attribute; must be explicitly selected)</entry>
+ </row>
+
+ <row>
+ <entry><structfield>pubname</structfield></entry>
+ <entry><type>Name</type></entry>
+ <entry></entry>
+ <entry>Name of the publication</entry>
+ </row>
+
+ <row>
+ <entry><structfield>pubowner</structfield></entry>
+ <entry><type>oid</type></entry>
+ <entry><literal><link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.oid</literal></entry>
+ <entry>Owner of the publication</entry>
+ </row>
+
+ <row>
+ <entry><structfield>puballtables</structfield></entry>
+ <entry><type>bool</type></entry>
+ <entry></entry>
+ <entry>If true, this publication automatically includes all tables
+ in the database, including any that will be created in the future.
+ </entry>
+ </row>
+
+ <row>
+ <entry><structfield>pubinsert</structfield></entry>
+ <entry><type>bool</type></entry>
+ <entry></entry>
+ <entry>If true, <command>INSERT</command> operations are replicated for
+ tables in the publication.</entry>
+ </row>
+
+ <row>
+ <entry><structfield>pubupdate</structfield></entry>
+ <entry><type>bool</type></entry>
+ <entry></entry>
+ <entry>If true, <command>UPDATE</command> operations are replicated for
+ tables in the publication.</entry>
+ </row>
+
+ <row>
+ <entry><structfield>pubdelete</structfield></entry>
+ <entry><type>bool</type></entry>
+ <entry></entry>
+ <entry>If true, <command>DELETE</command> operations are replicated for
+ tables in the publication.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </sect1>
+
+ <sect1 id="catalog-pg-publication-rel">
+ <title><structname>pg_publication_rel</structname></title>
+
+ <indexterm zone="catalog-pg-publication-rel">
+ <primary>pg_publication_rel</primary>
+ </indexterm>
+
+ <para>
+ The catalog <structname>pg_publication_rel</structname> contains the
+ mapping between relations and publications in the database. This is a
+ many-to-many mapping. See also <xref linkend="view-pg-publication-tables">
+ for a more user-friendly view of this information.
+ </para>
+
+ <table>
+ <title><structname>pg_publication_rel</structname> Columns</title>
+
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>References</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><structfield>prpubid</structfield></entry>
+ <entry><type>oid</type></entry>
+ <entry><literal><link linkend="catalog-pg-publication"><structname>pg_publication</structname></link>.oid</literal></entry>
+ <entry>Reference to publication</entry>
+ </row>
+
+ <row>
+ <entry><structfield>prrelid</structfield></entry>
+ <entry><type>oid</type></entry>
+ <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry>
+ <entry>Reference to relation</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </sect1>
+
<sect1 id="catalog-pg-range">
<title><structname>pg_range</structname></title>
</table>
</sect1>
+ <sect1 id="catalog-pg-sequence">
+ <title><structname>pg_sequence</structname></title>
+
+ <indexterm zone="catalog-pg-sequence">
+ <primary>pg_sequence</primary>
+ </indexterm>
+
+ <para>
+ The catalog <structname>pg_sequence</structname> contains information about
+ sequences. Some of the information about sequences, such as the name and
+ the schema, is in <structname>pg_class</structname>.
+ </para>
+
+ <table>
+ <title><structname>pg_sequence</> Columns</title>
+
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>References</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><structfield>seqrelid</structfield></entry>
+ <entry><type>oid</type></entry>
+ <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry>
+ <entry>The OID of the <structname>pg_class</> entry for this sequence</entry>
+ </row>
+
+ <row>
+ <entry><structfield>seqtypid</structfield></entry>
+ <entry><type>oid</type></entry>
+ <entry><literal><link linkend="catalog-pg-type"><structname>pg_type</structname></link>.oid</literal></entry>
+ <entry>Data type of the sequence</entry>
+ </row>
+
+ <row>
+ <entry><structfield>seqstart</structfield></entry>
+ <entry><type>int8</type></entry>
+ <entry></entry>
+ <entry>Start value of the sequence</entry>
+ </row>
+
+ <row>
+ <entry><structfield>seqincrement</structfield></entry>
+ <entry><type>int8</type></entry>
+ <entry></entry>
+ <entry>Increment value of the sequence</entry>
+ </row>
+
+ <row>
+ <entry><structfield>seqmax</structfield></entry>
+ <entry><type>int8</type></entry>
+ <entry></entry>
+ <entry>Maximum value of the sequence</entry>
+ </row>
+
+ <row>
+ <entry><structfield>seqmin</structfield></entry>
+ <entry><type>int8</type></entry>
+ <entry></entry>
+ <entry>Minimum value of the sequence</entry>
+ </row>
+
+ <row>
+ <entry><structfield>seqcache</structfield></entry>
+ <entry><type>int8</type></entry>
+ <entry></entry>
+ <entry>Cache size of the sequence</entry>
+ </row>
+
+ <row>
+ <entry><structfield>seqcycle</structfield></entry>
+ <entry><type>bool</type></entry>
+ <entry></entry>
+ <entry>Whether the sequence cycles</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </sect1>
+
<sect1 id="catalog-pg-shdepend">
<title><structname>pg_shdepend</structname></title>
</para>
<para>
- <structname>pg_statistic</structname> also stores statistical data about
- the values of index expressions. These are described as if they were
- actual data columns; in particular, <structfield>starelid</structfield>
- references the index. No entry is made for an ordinary non-expression
- index column, however, since it would be redundant with the entry
- for the underlying table column. Currently, entries for index expressions
- always have <structfield>stainherit</> = <literal>false</>.
+ <structname>pg_statistic</structname> also stores statistical data about
+ the values of index expressions. These are described as if they were
+ actual data columns; in particular, <structfield>starelid</structfield>
+ references the index. No entry is made for an ordinary non-expression
+ index column, however, since it would be redundant with the entry
+ for the underlying table column. Currently, entries for index expressions
+ always have <structfield>stainherit</> = <literal>false</>.
+ </para>
+
+ <para>
+ Since different kinds of statistics might be appropriate for different
+ kinds of data, <structname>pg_statistic</structname> is designed not
+ to assume very much about what sort of statistics it stores. Only
+ extremely general statistics (such as nullness) are given dedicated
+ columns in <structname>pg_statistic</structname>. Everything else
+ is stored in <quote>slots</quote>, which are groups of associated columns
+ whose content is identified by a code number in one of the slot's columns.
+ For more information see
+ <filename>src/include/catalog/pg_statistic.h</filename>.
+ </para>
+
+ <para>
+ <structname>pg_statistic</structname> should not be readable by the
+ public, since even statistical information about a table's contents
+ might be considered sensitive. (Example: minimum and maximum values
+ of a salary column might be quite interesting.)
+ <link linkend="view-pg-stats"><structname>pg_stats</structname></link>
+ is a publicly readable view on
+ <structname>pg_statistic</structname> that only exposes information
+ about those tables that are readable by the current user.
+ </para>
+
+ <table>
+ <title><structname>pg_statistic</> Columns</title>
+
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>References</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><structfield>starelid</structfield></entry>
+ <entry><type>oid</type></entry>
+ <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry>
+ <entry>The table or index that the described column belongs to</entry>
+ </row>
+
+ <row>
+ <entry><structfield>staattnum</structfield></entry>
+ <entry><type>int2</type></entry>
+ <entry><literal><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</literal></entry>
+ <entry>The number of the described column</entry>
+ </row>
+
+ <row>
+ <entry><structfield>stainherit</structfield></entry>
+ <entry><type>bool</type></entry>
+ <entry></entry>
+ <entry>If true, the stats include inheritance child columns, not just the
+ values in the specified relation</entry>
+ </row>
+
+ <row>
+ <entry><structfield>stanullfrac</structfield></entry>
+ <entry><type>float4</type></entry>
+ <entry></entry>
+ <entry>The fraction of the column's entries that are null</entry>
+ </row>
+
+ <row>
+ <entry><structfield>stawidth</structfield></entry>
+ <entry><type>int4</type></entry>
+ <entry></entry>
+ <entry>The average stored width, in bytes, of nonnull entries</entry>
+ </row>
+
+ <row>
+ <entry><structfield>stadistinct</structfield></entry>
+ <entry><type>float4</type></entry>
+ <entry></entry>
+ <entry>The number of distinct nonnull data values in the column.
+ A value greater than zero is the actual number of distinct values.
+ A value less than zero is the negative of a multiplier for the number
+ of rows in the table; for example, a column in which about 80% of the
+ values are nonnull and each nonnull value appears about twice on
+ average could be represented by <structfield>stadistinct</> = -0.4.
+ A zero value means the number of distinct values is unknown.
+ </entry>
+ </row>
+
+ <row>
+ <entry><structfield>stakind<replaceable>N</></structfield></entry>
+ <entry><type>int2</type></entry>
+ <entry></entry>
+ <entry>
+ A code number indicating the kind of statistics stored in the
+ <replaceable>N</>th <quote>slot</quote> of the
+ <structname>pg_statistic</structname> row.
+ </entry>
+ </row>
+
+ <row>
+ <entry><structfield>staop<replaceable>N</></structfield></entry>
+ <entry><type>oid</type></entry>
+ <entry><literal><link linkend="catalog-pg-operator"><structname>pg_operator</structname></link>.oid</literal></entry>
+ <entry>
+ An operator used to derive the statistics stored in the
+ <replaceable>N</>th <quote>slot</quote>. For example, a
+ histogram slot would show the <literal><</literal> operator
+ that defines the sort order of the data.
+ </entry>
+ </row>
+
+ <row>
+ <entry><structfield>stanumbers<replaceable>N</></structfield></entry>
+ <entry><type>float4[]</type></entry>
+ <entry></entry>
+ <entry>
+ Numerical statistics of the appropriate kind for the
+ <replaceable>N</>th <quote>slot</quote>, or null if the slot
+ kind does not involve numerical values
+ </entry>
+ </row>
+
+ <row>
+ <entry><structfield>stavalues<replaceable>N</></structfield></entry>
+ <entry><type>anyarray</type></entry>
+ <entry></entry>
+ <entry>
+ Column data values of the appropriate kind for the
+ <replaceable>N</>th <quote>slot</quote>, or null if the slot
+ kind does not store any data values. Each array's element
+ values are actually of the specific column's data type, or a related
+ type such as an array's element type, so there is no way to define
+ these columns' type more specifically than <type>anyarray</>.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </sect1>
+
+ <sect1 id="catalog-pg-statistic-ext">
+ <title><structname>pg_statistic_ext</structname></title>
+
+ <indexterm zone="catalog-pg-statistic-ext">
+ <primary>pg_statistic_ext</primary>
+ </indexterm>
+
+ <para>
+ The catalog <structname>pg_statistic_ext</structname>
+ holds extended planner statistics.
+ Each row in this catalog corresponds to a <firstterm>statistics object</>
+ created with <xref linkend="sql-createstatistics">.
+ </para>
+
+ <table>
+ <title><structname>pg_statistic_ext</> Columns</title>
+
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>References</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry><structfield>stxrelid</structfield></entry>
+ <entry><type>oid</type></entry>
+ <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry>
+ <entry>Table containing the columns described by this object</entry>
+ </row>
+
+ <row>
+ <entry><structfield>stxname</structfield></entry>
+ <entry><type>name</type></entry>
+ <entry></entry>
+ <entry>Name of the statistics object</entry>
+ </row>
+
+ <row>
+ <entry><structfield>stxnamespace</structfield></entry>
+ <entry><type>oid</type></entry>
+ <entry><literal><link linkend="catalog-pg-namespace"><structname>pg_namespace</structname></link>.oid</literal></entry>
+ <entry>
+ The OID of the namespace that contains this statistics object
+ </entry>
+ </row>
+
+ <row>
+ <entry><structfield>stxowner</structfield></entry>
+ <entry><type>oid</type></entry>
+ <entry><literal><link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.oid</literal></entry>
+ <entry>Owner of the statistics object</entry>
+ </row>
+
+ <row>
+ <entry><structfield>stxkeys</structfield></entry>
+ <entry><type>int2vector</type></entry>
+ <entry><literal><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</literal></entry>
+ <entry>
+ An array of attribute numbers, indicating which table columns are
+ covered by this statistics object;
+ for example a value of <literal>1 3</literal> would
+ mean that the first and the third table columns are covered
+ </entry>
+ </row>
+
+ <row>
+ <entry><structfield>stxkind</structfield></entry>
+ <entry><type>char[]</type></entry>
+ <entry></entry>
+ <entry>
+ An array containing codes for the enabled statistic types;
+ valid values are:
+ <literal>d</literal> for n-distinct statistics,
+ <literal>f</literal> for functional dependency statistics
+ </entry>
+ </row>
+
+ <row>
+ <entry><structfield>stxndistinct</structfield></entry>
+ <entry><type>pg_ndistinct</type></entry>
+ <entry></entry>
+ <entry>
+ N-distinct counts, serialized as <structname>pg_ndistinct</> type
+ </entry>
+ </row>
+
+ <row>
+ <entry><structfield>stxdependencies</structfield></entry>
+ <entry><type>pg_dependencies</type></entry>
+ <entry></entry>
+ <entry>
+ Functional dependency statistics, serialized
+ as <structname>pg_dependencies</> type
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>
+ The <structfield>stxkind</structfield> field is filled at creation of the
+ statistics object, indicating which statistic type(s) are desired.
+ The fields after it are initially NULL and are filled only when the
+ corresponding statistic has been computed by <command>ANALYZE</>.
+ </para>
+ </sect1>
+
+ <sect1 id="catalog-pg-subscription">
+ <title><structname>pg_subscription</structname></title>
+
+ <indexterm zone="catalog-pg-subscription">
+ <primary>pg_subscription</primary>
+ </indexterm>
+
+ <para>
+ The catalog <structname>pg_subscription</structname> contains all existing
+ logical replication subscriptions. For more information about logical
+ replication see <xref linkend="logical-replication">.
</para>
<para>
- Since different kinds of statistics might be appropriate for different
- kinds of data, <structname>pg_statistic</structname> is designed not
- to assume very much about what sort of statistics it stores. Only
- extremely general statistics (such as nullness) are given dedicated
- columns in <structname>pg_statistic</structname>. Everything else
- is stored in <quote>slots</quote>, which are groups of associated columns
- whose content is identified by a code number in one of the slot's columns.
- For more information see
- <filename>src/include/catalog/pg_statistic.h</filename>.
+ Unlike most system catalogs, <structname>pg_subscription</structname> is
+ shared across all databases of a cluster: There is only one copy
+ of <structname>pg_subscription</structname> per cluster, not one per
+ database.
</para>
<para>
- <structname>pg_statistic</structname> should not be readable by the
- public, since even statistical information about a table's contents
- might be considered sensitive. (Example: minimum and maximum values
- of a salary column might be quite interesting.)
- <link linkend="view-pg-stats"><structname>pg_stats</structname></link>
- is a publicly readable view on
- <structname>pg_statistic</structname> that only exposes information
- about those tables that are readable by the current user.
+ Access to the column <structfield>subconninfo</structfield> is revoked from
+ normal users, because it could contain plain-text passwords.
</para>
<table>
- <title><structname>pg_statistic</> Columns</title>
+ <title><structname>pg_subscription</structname> Columns</title>
<tgroup cols="4">
<thead>
<tbody>
<row>
- <entry><structfield>starelid</structfield></entry>
+ <entry><structfield>oid</structfield></entry>
<entry><type>oid</type></entry>
- <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry>
- <entry>The table or index that the described column belongs to</entry>
+ <entry></entry>
+ <entry>Row identifier (hidden attribute; must be explicitly selected)</entry>
</row>
<row>
- <entry><structfield>staattnum</structfield></entry>
- <entry><type>int2</type></entry>
- <entry><literal><link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.attnum</literal></entry>
- <entry>The number of the described column</entry>
+ <entry><structfield>subdbid</structfield></entry>
+ <entry><type>oid</type></entry>
+ <entry><literal><link linkend="catalog-pg-database"><structname>pg_database</structname></link>.oid</literal></entry>
+ <entry>OID of the database which the subscription resides in</entry>
</row>
<row>
- <entry><structfield>stainherit</structfield></entry>
+ <entry><structfield>subname</structfield></entry>
+ <entry><type>name</type></entry>
+ <entry></entry>
+ <entry>Name of the subscription</entry>
+ </row>
+
+ <row>
+ <entry><structfield>subowner</structfield></entry>
+ <entry><type>oid</type></entry>
+ <entry><literal><link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.oid</literal></entry>
+ <entry>Owner of the subscription</entry>
+ </row>
+
+ <row>
+ <entry><structfield>subenabled</structfield></entry>
<entry><type>bool</type></entry>
<entry></entry>
- <entry>If true, the stats include inheritance child columns, not just the
- values in the specified relation</entry>
+ <entry>If true, the subscription is enabled and should be replicating.</entry>
</row>
<row>
- <entry><structfield>stanullfrac</structfield></entry>
- <entry><type>float4</type></entry>
+ <entry><structfield>subsynccommit</structfield></entry>
+ <entry><type>text</type></entry>
<entry></entry>
- <entry>The fraction of the column's entries that are null</entry>
+ <entry>
+ Contains the value of the <varname>synchronous_commit</varname>
+ setting for the subscription workers.
+ </entry>
</row>
<row>
- <entry><structfield>stawidth</structfield></entry>
- <entry><type>int4</type></entry>
+ <entry><structfield>subconninfo</structfield></entry>
+ <entry><type>text</type></entry>
<entry></entry>
- <entry>The average stored width, in bytes, of nonnull entries</entry>
+ <entry>Connection string to the upstream database</entry>
</row>
<row>
- <entry><structfield>stadistinct</structfield></entry>
- <entry><type>float4</type></entry>
+ <entry><structfield>subslotname</structfield></entry>
+ <entry><type>name</type></entry>
<entry></entry>
- <entry>The number of distinct nonnull data values in the column.
- A value greater than zero is the actual number of distinct values.
- A value less than zero is the negative of a multiplier for the number
- of rows in the table; for example, a column in which about 80% of the
- values are nonnull and each nonnull value appears about twice on
- average could be represented by <structfield>stadistinct</> = -0.4.
- A zero value means the number of distinct values is unknown.
- </entry>
+ <entry>Name of the replication slot in the upstream database. Also used
+ for local replication origin name.</entry>
</row>
<row>
- <entry><structfield>stakind<replaceable>N</></structfield></entry>
- <entry><type>int2</type></entry>
+ <entry><structfield>subpublications</structfield></entry>
+ <entry><type>text[]</type></entry>
<entry></entry>
- <entry>
- A code number indicating the kind of statistics stored in the
- <replaceable>N</>th <quote>slot</quote> of the
- <structname>pg_statistic</structname> row.
+ <entry>Array of subscribed publication names. These reference the
+ publications on the publisher server. For more on publications
+ see <xref linkend="logical-replication-publication">.
</entry>
</row>
+ </tbody>
+ </tgroup>
+ </table>
+ </sect1>
+
+ <sect1 id="catalog-pg-subscription-rel">
+ <title><structname>pg_subscription_rel</structname></title>
+
+ <indexterm zone="catalog-pg-subscription-rel">
+ <primary>pg_subscription_rel</primary>
+ </indexterm>
+
+ <para>
+ The catalog <structname>pg_subscription_rel</structname> contains the
+ state for each replicated relation in each subscription. This is a
+ many-to-many mapping.
+ </para>
+
+ <para>
+ This catalog only contains tables known to the subscription after running
+ either <command>CREATE SUBSCRIPTION</command> or
+ <command>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</command>.
+ </para>
+
+ <table>
+ <title><structname>pg_subscription_rel</structname> Columns</title>
+
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>References</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
<row>
- <entry><structfield>staop<replaceable>N</></structfield></entry>
+ <entry><structfield>srsubid</structfield></entry>
<entry><type>oid</type></entry>
- <entry><literal><link linkend="catalog-pg-operator"><structname>pg_operator</structname></link>.oid</literal></entry>
- <entry>
- An operator used to derive the statistics stored in the
- <replaceable>N</>th <quote>slot</quote>. For example, a
- histogram slot would show the <literal><</literal> operator
- that defines the sort order of the data.
- </entry>
+ <entry><literal><link linkend="catalog-pg-subscription"><structname>pg_subscription</structname></link>.oid</literal></entry>
+ <entry>Reference to subscription</entry>
</row>
<row>
- <entry><structfield>stanumbers<replaceable>N</></structfield></entry>
- <entry><type>float4[]</type></entry>
+ <entry><structfield>srrelid</structfield></entry>
+ <entry><type>oid</type></entry>
+ <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry>
+ <entry>Reference to relation</entry>
+ </row>
+
+ <row>
+ <entry><structfield>srsubstate</structfield></entry>
+ <entry><type>char</type></entry>
<entry></entry>
<entry>
- Numerical statistics of the appropriate kind for the
- <replaceable>N</>th <quote>slot</quote>, or null if the slot
- kind does not involve numerical values
+ State code:
+ <literal>i</> = initialize,
+ <literal>d</> = data is being copied,
+ <literal>s</> = synchronized,
+ <literal>r</> = ready (normal replication)
</entry>
</row>
<row>
- <entry><structfield>stavalues<replaceable>N</></structfield></entry>
- <entry><type>anyarray</type></entry>
+ <entry><structfield>srsublsn</structfield></entry>
+ <entry><type>pg_lsn</type></entry>
<entry></entry>
<entry>
- Column data values of the appropriate kind for the
- <replaceable>N</>th <quote>slot</quote>, or null if the slot
- kind does not store any data values. Each array's element
- values are actually of the specific column's data type, or a related
- type such as an array's element type, so there is no way to define
- these columns' type more specifically than <type>anyarray</>.
+ End LSN for <literal>s</> and <literal>r</> states.
</entry>
</row>
</tbody>
</tgroup>
</table>
-
</sect1>
-
<sect1 id="catalog-pg-tablespace">
<title><structname>pg_tablespace</structname></title>
<entry>groups of database users</entry>
</row>
+ <row>
+ <entry><link linkend="view-pg-hba-file-rules"><structname>pg_hba_file_rules</structname></link></entry>
+ <entry>summary of client authentication configuration file contents</entry>
+ </row>
+
<row>
<entry><link linkend="view-pg-indexes"><structname>pg_indexes</structname></link></entry>
<entry>indexes</entry>
<entry>prepared transactions</entry>
</row>
+ <row>
+ <entry><link linkend="view-pg-publication-tables"><structname>pg_publication_tables</structname></link></entry>
+ <entry>publications and their associated tables</entry>
+ </row>
+
<row>
<entry><link linkend="view-pg-replication-origin-status"><structname>pg_replication_origin_status</structname></link></entry>
<entry>information about replication origins, including replication progress</entry>
</sect1>
+ <sect1 id="view-pg-hba-file-rules">
+ <title><structname>pg_hba_file_rules</structname></title>
+
+ <indexterm zone="view-pg-hba-file-rules">
+ <primary>pg_hba_file_rules</primary>
+ </indexterm>
+
+ <para>
+ The view <structname>pg_hba_file_rules</structname> provides a summary of
+ the contents of the client authentication configuration
+ file, <filename>pg_hba.conf</>. A row appears in this view for each
+ non-empty, non-comment line in the file, with annotations indicating
+ whether the rule could be applied successfully.
+ </para>
+
+ <para>
+ This view can be helpful for checking whether planned changes in the
+ authentication configuration file will work, or for diagnosing a previous
+ failure. Note that this view reports on the <emphasis>current</> contents
+ of the file, not on what was last loaded by the server.
+ </para>
+
+ <para>
+ By default, the <structname>pg_hba_file_rules</structname> view can be read
+ only by superusers.
+ </para>
+
+ <table>
+ <title><structname>pg_hba_file_rules</> Columns</title>
+
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><structfield>line_number</structfield></entry>
+ <entry><structfield>integer</structfield></entry>
+ <entry>
+ Line number of this rule in <filename>pg_hba.conf</>
+ </entry>
+ </row>
+ <row>
+ <entry><structfield>type</structfield></entry>
+ <entry><structfield>text</structfield></entry>
+ <entry>Type of connection</entry>
+ </row>
+ <row>
+ <entry><structfield>database</structfield></entry>
+ <entry><structfield>text[]</structfield></entry>
+ <entry>List of database name(s) to which this rule applies</entry>
+ </row>
+ <row>
+ <entry><structfield>user_name</structfield></entry>
+ <entry><structfield>text[]</structfield></entry>
+ <entry>List of user and group name(s) to which this rule applies</entry>
+ </row>
+ <row>
+ <entry><structfield>address</structfield></entry>
+ <entry><structfield>text</structfield></entry>
+ <entry>
+ Host name or IP address, or one
+ of <literal>all</literal>, <literal>samehost</literal>,
+ or <literal>samenet</literal>, or null for local connections
+ </entry>
+ </row>
+ <row>
+ <entry><structfield>netmask</structfield></entry>
+ <entry><structfield>text</structfield></entry>
+ <entry>IP address mask, or null if not applicable</entry>
+ </row>
+ <row>
+ <entry><structfield>auth_method</structfield></entry>
+ <entry><type>text</type></entry>
+ <entry>Authentication method</entry>
+ </row>
+ <row>
+ <entry><structfield>options</structfield></entry>
+ <entry><type>text[]</type></entry>
+ <entry>Options specified for authentication method, if any</entry>
+ </row>
+ <row>
+ <entry><structfield>error</structfield></entry>
+ <entry><structfield>text</structfield></entry>
+ <entry>
+ If not null, an error message indicating why this
+ line could not be processed
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>
+ Usually, a row reflecting an incorrect entry will have values for only
+ the <structfield>line_number</> and <structfield>error</> fields.
+ </para>
+
+ <para>
+ See <xref linkend="client-authentication"> for more information about
+ client authentication configuration.
+ </para>
+ </sect1>
+
<sect1 id="view-pg-indexes">
<title><structname>pg_indexes</structname></title>
</sect1>
+ <sect1 id="view-pg-publication-tables">
+ <title><structname>pg_publication_tables</structname></title>
+
+ <indexterm zone="view-pg-publication-tables">
+ <primary>pg_publication_tables</primary>
+ </indexterm>
+
+ <para>
+ The view <structname>pg_publication_tables</structname> provides
+ information about the mapping between publications and the tables they
+ contain. Unlike the underlying
+ catalog <structname>pg_publication_rel</structname>, this view expands
+ publications defined as <literal>FOR ALL TABLES</literal>, so for such
+ publications there will be a row for each eligible table.
+ </para>
+
+ <table>
+ <title><structname>pg_publication_tables</structname> Columns</title>
+
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry>References</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><structfield>pubname</structfield></entry>
+ <entry><type>name</type></entry>
+ <entry><literal><link linkend="catalog-pg-publication"><structname>pg_publication</structname></link>.pubname</literal></entry>
+ <entry>Name of publication</entry>
+ </row>
+
+ <row>
+ <entry><structfield>schemaname</structfield></entry>
+ <entry><type>name</type></entry>
+ <entry><literal><link linkend="catalog-pg-namespace"><structname>pg_namespace</structname></link>.nspname</literal></entry>
+ <entry>Name of schema containing table</entry>
+ </row>
+
+ <row>
+ <entry><structfield>tablename</structfield></entry>
+ <entry><type>name</type></entry>
+ <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.relname</literal></entry>
+ <entry>Name of table</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </sect1>
+
<sect1 id="view-pg-replication-origin-status">
<title><structname>pg_replication_origin_status</structname></title>
null. Only logical slots have an associated database.</entry>
</row>
+ <row>
+ <entry><structfield>temporary</structfield></entry>
+ <entry><type>boolean</type></entry>
+ <entry></entry>
+ <entry>True if this is a temporary replication slot. Temporary slots are
+ not saved to disk and are automatically dropped on error or when
+ the session has finished.</entry>
+ </row>
+
<row>
<entry><structfield>active</structfield></entry>
<entry><type>boolean</type></entry>
<entry><literal><link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.rolname</literal></entry>
<entry>Name of sequence's owner</entry>
</row>
+ <row>
+ <entry><structfield>data_type</structfield></entry>
+ <entry><type>regtype</type></entry>
+ <entry><literal><link linkend="catalog-pg-authid"><structname>pg_type</structname></link>.oid</literal></entry>
+ <entry>Data type of the sequence</entry>
+ </row>
<row>
<entry><structfield>start_value</structfield></entry>
<entry><type>bigint</type></entry>
<entry></entry>
<entry>The last sequence value written to disk. If caching is used,
this value can be greater than the last value handed out from the
- sequence. Null if the sequence has not been read from yet.</entry>
+ sequence. Null if the sequence has not been read from yet. Also, if
+ the current user does not have <literal>USAGE</literal>
+ or <literal>SELECT</literal> privilege on the sequence, the value is
+ null.</entry>
</row>
</tbody>
</tgroup>
<entry><type>text</type></entry>
<entry>Configuration file the current value was set in (null for
values set from sources other than configuration files, or when
- examined by a non-superuser);
- helpful when using <literal>include</> directives in configuration files</entry>
+ examined by a user who is neither a superuser or a member of
+ <literal>pg_read_all_settings</literal>); helpful when using
+ <literal>include</> directives in configuration files</entry>
</row>
<row>
<entry><structfield>sourceline</structfield></entry>
<entry><type>integer</type></entry>
<entry>Line number within the configuration file the current value was
set at (null for values set from sources other than configuration files,
- or when examined by a non-superuser)
+ or when examined by a user who is neither a superuser or a member of
+ <literal>pg_read_all_settings</literal>).
</entry>
</row>
<row>
<entry></entry>
<entry>
User mapping specific options, as <quote>keyword=value</>
- strings, if the current user is the owner of the foreign
- server, else null
+ strings. This column will show as null unless the current user
+ is the user being mapped, or the mapping is for
+ <literal>PUBLIC</literal> and the current user is the server
+ owner, or the current user is a superuser. The intent is
+ to protect password information stored as user mapping option.
</entry>
</row>
</tbody>