Re: bogus error message for ALTER TABLE ALTER CONSTRAINT

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Álvaro Herrera <alvherre@alvh.no-ip.org>
To: Amul Sul <sulamul@gmail.com>
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-14T11:16:43Z
Lists: pgsql-hackers
On 2025-Mar-11, Amul Sul wrote:

> I was thinking of something like the attached, which includes your
> test cases from 0001. Perhaps the macro name could be improved.

FWIW I like this general idea.  I don't like the proposed names much
though, especially the abuse of ALL_CAPS; and because they operate on
the given bits themselves rather than the output of processCASbits(), I
would have these checks before doing anything else.  (Also, for nicer
code layout I would perhaps make the macros static inline functions.)

I'm going to stay away from this for a bit, as I think this is of
somewhat secondary importance.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Every machine is a smoke machine if you operate it wrong enough."
https://twitter.com/libseybieda/status/1541673325781196801



Commits

  1. Fix bogus grammar for a CREATE CONSTRAINT TRIGGER error

  2. Fix ALTER TABLE error message