pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix error message for ALTER CONSTRAINT ... NOT VALID 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix error message for ALTER CONSTRAINT ... NOT VALID @ 2025-07-02 15:04 Álvaro Herrera <alvherre@kurilemu.de> 0 siblings, 0 replies; 2+ messages in thread From: Álvaro Herrera @ 2025-07-02 15:04 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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.universality@gmail.com> Co-authored-by: Fujii Masao <masao.fujii@oss.nttdata.com> Co-authored-by: Álvaro Herrera <alvherre@kurilemu.de> Co-authored-by: Amul Sul <sulamul@gmail.com> Discussion: https://postgr.es/m/CACJufxHSp2puxP=q8ZtUGL1F+heapnzqFBZy5ZNGUjUgwjBqTQ@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/c989affb527d330898e92e6223e2218e702176ed 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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix error message for ALTER CONSTRAINT ... NOT VALID @ 2025-07-02 15:04 Álvaro Herrera <alvherre@kurilemu.de> 0 siblings, 0 replies; 2+ messages in thread From: Álvaro Herrera @ 2025-07-02 15:04 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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.universality@gmail.com> Co-authored-by: Fujii Masao <masao.fujii@oss.nttdata.com> Co-authored-by: Álvaro Herrera <alvherre@kurilemu.de> Co-authored-by: Amul Sul <sulamul@gmail.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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-07-02 15:04 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-07-02 15:04 pgsql: Fix error message for ALTER CONSTRAINT ... NOT VALID Álvaro Herrera <alvherre@kurilemu.de> 2025-07-02 15:04 pgsql: Fix error message for ALTER CONSTRAINT ... NOT VALID Álvaro Herrera <alvherre@kurilemu.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox