Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 58efabd

Browse files
committed
Review wording on tablespaces w.r.t. partitioned tables
Remove a redundant comment, and document pg_class.reltablespace properly in catalogs.sgml. After commits a36c84c, 8725958 and others. Backpatch to 12. Discussion: https://postgr.es/m/202403191013.w2kr7wqlamqz@alvherre.pgsql
1 parent f3e4581 commit 58efabd

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

doc/src/sgml/catalogs.sgml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,9 +1750,12 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
17501750
<entry><type>oid</type></entry>
17511751
<entry><literal><link linkend="catalog-pg-tablespace"><structname>pg_tablespace</structname></link>.oid</literal></entry>
17521752
<entry>
1753-
The tablespace in which this relation is stored. If zero,
1754-
the database's default tablespace is implied. (Not meaningful
1755-
if the relation has no on-disk file.)
1753+
The tablespace in which this relation is stored.
1754+
If zero, the database's default tablespace is implied.
1755+
Not meaningful if the relation has no on-disk file,
1756+
except for partitioned tables, where this is the tablespace
1757+
in which partitions will be created when one is not
1758+
specified in the creation command.
17561759
</entry>
17571760
</row>
17581761

src/backend/commands/tablecmds.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -695,10 +695,6 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
695695
}
696696
else if (stmt->partbound)
697697
{
698-
/*
699-
* For partitions, when no other tablespace is specified, we default
700-
* the tablespace to the parent partitioned table's.
701-
*/
702698
Assert(list_length(inheritOids) == 1);
703699
tablespaceId = get_rel_tablespace(linitial_oid(inheritOids));
704700
}

0 commit comments

Comments
 (0)