| From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Fix error message for ALTER CONSTRAINT ... NOT VALID |
| Date: | 2025-07-02 15:04:14 |
| Message-ID: | E1uWz0Q-004MzP-0H@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Fix error message for ALTER CONSTRAINT ... NOT VALID
Trying to alter a constraint so that it becomes NOT VALID results in an
error that assumes the constraint is a foreign key. This is potentially
wrong, so give a more generic error message.
While at it, give CREATE CONSTRAINT TRIGGER a better error message as
well.
Co-authored-by: jian he <jian(dot)universality(at)gmail(dot)com>
Co-authored-by: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Co-authored-by: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Co-authored-by: Amul Sul <sulamul(at)gmail(dot)com>
Discussion: https://postgr.es/m/CACJufxHSp2puxP=q8ZtUGL1F+heapnzqFBZy5ZNGUjUgwjBqTQ@mail.gmail.com
Branch
------
REL_18_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/e16c9cd331314fcf3f7a8d9e3e20aaee448162e4
Modified Files
--------------
src/backend/parser/gram.y | 6 ++++++
src/test/regress/expected/constraints.out | 5 +++++
src/test/regress/expected/foreign_key.out | 2 +-
src/test/regress/sql/constraints.sql | 3 +++
4 files changed, 15 insertions(+), 1 deletion(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2025-07-02 15:34:47 | pgsql: Allow width_bucket()'s "operand" input to be NaN. |
| Previous Message | Peter Geoghegan | 2025-07-02 13:49:52 | pgsql: Make row compares robust during nbtree array scans. |