Re: ALTER TABLE ALTER CONSTRAINT misleading error message

Álvaro Herrera <alvherre@kurilemu.de>

From: Álvaro Herrera <alvherre@kurilemu.de>
To: "Fujii Masao" <masao.fujii@oss.nttdata.com>, "jian he" <jian.universality@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-06-27T13:30:43Z
Lists: pgsql-hackers
On 2025-06-27, Fujii Masao wrote:

> To make this distinction, I just started thinking it's better to raise 
> the error
> in ATExecAlterConstraint() rather than in gram.y. I've attached a draft 
> patch that
> follows this approach.

Hmm I don't like this very much, it feels very kludgy. I think if we want to consider this in scope for pg18 I would much prefer to use the patch I mentioned near the beginning of the thread.



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix bogus grammar for a CREATE CONSTRAINT TRIGGER error

  2. Fix error message for ALTER CONSTRAINT ... NOT VALID