diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2024-03-20 15:28:14 +0100 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2024-03-20 15:28:14 +0100 |
commit | a0390f6ca6c730949577e0d3c1fde7a77696ca17 (patch) | |
tree | 839ac064368fa6c94dd531a2d420c0ed058c1764 | |
parent | da952b415f4444fcc85ea79c3f006af142d3c90a (diff) | |
download | postgresql-a0390f6ca6c730949577e0d3c1fde7a77696ca17.tar.gz postgresql-a0390f6ca6c730949577e0d3c1fde7a77696ca17.zip |
Review wording on tablespaces w.r.t. partitioned tables
Remove a redundant comment, and document pg_class.reltablespace properly
in catalogs.sgml.
After commits a36c84c3e4a9, 87259588d0ab and others.
Backpatch to 12.
Discussion: https://postgr.es/m/202403191013.w2kr7wqlamqz@alvherre.pgsql
-rw-r--r-- | doc/src/sgml/catalogs.sgml | 9 | ||||
-rw-r--r-- | src/backend/commands/tablecmds.c | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 2f091ad09d1..b7980eb4994 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -2011,9 +2011,12 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l (references <link linkend="catalog-pg-tablespace"><structname>pg_tablespace</structname></link>.<structfield>oid</structfield>) </para> <para> - The tablespace in which this relation is stored. If zero, - the database's default tablespace is implied. (Not meaningful - if the relation has no on-disk file.) + The tablespace in which this relation is stored. + If zero, the database's default tablespace is implied. + 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. </para></entry> </row> diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 3ed0618b4e6..6c0c899210b 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -807,10 +807,6 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId, } 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); tablespaceId = get_rel_tablespace(linitial_oid(inheritOids)); } |