doc-tableoid-regclass.v1.patch
text/x-patch
Filename: doc-tableoid-regclass.v1.patch
Type: text/x-patch
Part: 0
Message:
[doc] improve tableoid description
Patch
Format: unified
Series: patch v1
| File | + | − |
|---|---|---|
| doc/src/sgml/ddl.sgml | 9 | 3 |
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index c4897d68c9..f916f0bd70 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -1144,12 +1144,18 @@ CREATE TABLE circles (
<para>
The OID of the table containing this row. This column is
- particularly handy for queries that select from inheritance
+ particularly handy for queries that select from partitioned
+ tables (see <xref linkend="ddl-partitioning"/>) or inheritance
hierarchies (see <xref linkend="ddl-inherit"/>), since without it,
it's difficult to tell which individual table a row came from. The
- <structfield>tableoid</structfield> can be joined against the
+ <structfield>tableoid</structfield> can be cast to <type>regclass</type>
+ to obtain the table name. However the table's schema will only be shown
+ if the table is <emphasis>not</emphasis> in the default path, otherwise
+ <structfield>tableoid</structfield> will need to be joined against the
<structfield>oid</structfield> column of
- <structname>pg_class</structname> to obtain the table name.
+ <link linkend="catalog-pg-class"><structname>pg_class</structname></link>
+ to obtain the <structfield>relnamespace</structfield> OID (which itself
+ can be cast to <type>regnamespace</type> to obtain the schema name).
</para>
</listitem>
</varlistentry>