]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Improve "constraint must include all partitioning columns" message.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 9 Jan 2026 17:59:35 +0000 (12:59 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 9 Jan 2026 17:59:35 +0000 (12:59 -0500)
commit7a1d422e39baac3627f5a67e7e16dcc6110830dc
treeca6133041bc62d426b98e8dba0fcf5f1770493e9
parent7a485bd641b7bbf072146b97f70f9eb2c89f606a
Improve "constraint must include all partitioning columns" message.

This formerly said "unique constraint must ...", which was accurate
enough when it only applied to UNIQUE and PRIMARY KEY constraints.
However, now we use it for exclusion constraints too, and in that
case it's a tad confusing.  Do what we already did in the errdetail
message: print the constraint_type, so that it looks like "UNIQUE
constraint ...", "EXCLUDE constraint ...", etc.

Author: jian he <jian.universality@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CACJufxH6VhAf65Vghg4T2q315gY=Rt4BUfMyunkfRj0n2S9n-g@mail.gmail.com
src/backend/commands/indexcmds.c
src/test/regress/expected/indexing.out