Re: ALTER TABLE ALTER CONSTRAINT misleading error message
Tender Wang <tndrwang@gmail.com>
From: Tender Wang <tndrwang@gmail.com>
To: jian he <jian.universality@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-05-28T09:26:33Z
Lists: pgsql-hackers
jian he <jian.universality@gmail.com> 于2025年5月28日周三 17:10写道: > hi. > > create table t(a int, constraint cc check(a = 1)); > ALTER TABLE t ALTER CONSTRAINT cc not valid; > ERROR: FOREIGN KEY constraints cannot be marked NOT VALID > LINE 1: ALTER TABLE t ALTER CONSTRAINT cc not valid; > ^ > > the error message seems misleading, > should we consider it as a bug for pg18? > the entry point is in gram.y, following part: > It looks like a bug, because constraint cc is not a FOREIGN KEY constraint. -- Thanks, Tender Wang
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix bogus grammar for a CREATE CONSTRAINT TRIGGER error
- 87251e114967 19 (unreleased) landed
-
Fix error message for ALTER CONSTRAINT ... NOT VALID
- e16c9cd33131 18.0 landed
- c989affb527d 19 (unreleased) landed