Re: bogus error message for ALTER TABLE ALTER CONSTRAINT

Amul Sul <sulamul@gmail.com>

From: Amul Sul <sulamul@gmail.com>
To: Álvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Pg Hackers <pgsql-hackers@lists.postgresql.org>, Peter Eisentraut <peter@eisentraut.org>, Nathan Bossart <nathandbossart@gmail.com>
Date: 2025-03-11T04:32:33Z
Lists: pgsql-hackers
On Mon, Mar 10, 2025 at 11:29 PM Álvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> Hello,
>
> I fleshed this out more fully and I think 0001 is good enough to commit.
>

The approach looks good to me, but instead of adding a CAS_flags struct, could
we use macros like SEEN_DEFERRABILITY(bits), SEEN_ENFORCEABILITY(bits),
etc.? We can simply pass cas_bits to these macros, and to avoid the error
from processCASbits(), we can pass NULL for constrType.


Regards,
Amul



Commits

  1. Fix bogus grammar for a CREATE CONSTRAINT TRIGGER error

  2. Fix ALTER TABLE error message