Review wording on tablespaces w.r.t. partitioned tables

Remove a redundant comment, and document pg_class.reltablespace properly
in catalogs.sgml.

After commits a36c84c3e4, 87259588d0 and others.

Backpatch to 12.

Discussion: https://postgr.es/m/202403191013.w2kr7wqlamqz@alvherre.pgsql
This commit is contained in:
Alvaro Herrera 2024-03-20 15:28:14 +01:00
parent f3e4581acd
commit 58efabdc0c
No known key found for this signature in database
GPG Key ID: 1C20ACB9D5C564AE
2 changed files with 6 additions and 7 deletions

View File

@ -1750,9 +1750,12 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
<entry><type>oid</type></entry> <entry><type>oid</type></entry>
<entry><literal><link linkend="catalog-pg-tablespace"><structname>pg_tablespace</structname></link>.oid</literal></entry> <entry><literal><link linkend="catalog-pg-tablespace"><structname>pg_tablespace</structname></link>.oid</literal></entry>
<entry> <entry>
The tablespace in which this relation is stored. If zero, The tablespace in which this relation is stored.
the database's default tablespace is implied. (Not meaningful If zero, the database's default tablespace is implied.
if the relation has no on-disk file.) Not meaningful if the relation has no on-disk file,
except for partitioned tables, where this is the tablespace
in which partitions will be created when one is not
specified in the creation command.
</entry> </entry>
</row> </row>

View File

@ -695,10 +695,6 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
} }
else if (stmt->partbound) else if (stmt->partbound)
{ {
/*
* For partitions, when no other tablespace is specified, we default
* the tablespace to the parent partitioned table's.
*/
Assert(list_length(inheritOids) == 1); Assert(list_length(inheritOids) == 1);
tablespaceId = get_rel_tablespace(linitial_oid(inheritOids)); tablespaceId = get_rel_tablespace(linitial_oid(inheritOids));
} }