git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: da952b4)
Review wording on tablespaces w.r.t. partitioned tables
2024年3月20日 14:28:14 +0000 (15:28 +0100)
2024年3月20日 14:28:14 +0000 (15:28 +0100)
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


diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 2f091ad09d1d5af918cca53b121e20e0c2ad5c1d..b7980eb49947b830f2f075ab3bec1d8aea576319 100644 (file)
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -2011,9 +2011,12 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</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 3ed0618b4e609cd626f5ea2fc524c1650d16f766..6c0c899210bfaa2d3630106230d4831bbaab18df 100644 (file)
--- 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));
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /