]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Doc: clarify partitioned table limitations
authorDavid Rowley <drowley@postgresql.org>
Mon, 5 Sep 2022 06:45:17 +0000 (18:45 +1200)
committerDavid Rowley <drowley@postgresql.org>
Mon, 5 Sep 2022 06:45:17 +0000 (18:45 +1200)
commit844ac0967e390583f589832d084f102e0791d0d6
tree0a95385c60091c73fb8ad4a772972a09a4444202
parenta78c38417a6030c900853a31b776265e57ac7e48
Doc: clarify partitioned table limitations

Improve documentation regarding the limitations of unique and primary key
constraints on partitioned tables.  The existing documentation didn't make
it clear that the constraint columns had to be present in the partition
key as bare columns.  The reader could be led to believe that it was ok to
include the constraint columns as part of a function call's parameters or
as part of an expression.  Additionally, the documentation didn't mention
anything about the fact that we disallow unique and primary key
constraints if the partition keys contain *any* function calls or
expressions, regardless of if the constraint columns appear as columns
elsewhere in the partition key.

The confusion here was highlighted by a report on the general mailing list
by James Vanns.

Discussion: https://postgr.es/m/CAH7vdhNF0EdYZz3GLpgE3RSJLwWLhEk7A_fiKS9dPBT3Dz_3eA@mail.gmail.com
Discussion: https://postgr.es/m/CAApHDvoU-u9iTqKjteYRFfi+UNEk7dbSAcyxEQD==vZt9B1KnA@mail.gmail.com
Reviewed-by: Erik Rijkers
Backpatch-through: 11
doc/src/sgml/ddl.sgml