BUG #19724: ALTER TYPE ... ALTER ATTRIBUTE triggers internal error for base type of domain with check
The following bug has been logged on the website:
Bug reference: 19724
Logged by: Alexander Lakhin
Email address: exclusion@gmail.com
PostgreSQL version: 19beta4
Operating system: Ubuntu 24.04
Description:
The following script:
CREATE TYPE rt AS (i int);
CREATE DOMAIN dt AS int CHECK ((ROW(value)::rt).i > 0);
ALTER TYPE rt ALTER ATTRIBUTE i TYPE bigint;
triggers an internal
ERROR: XX000: could not identify relation associated with constraint 16390
LOCATION: ATPostAlterTypeCleanup, tablecmds.c:16147
Reproduced starting from af20e2d72.
Hi,
Thanks for the report. I sent a patch for this on pgsql-hackers. It
can be found at
/messages/by-id/CAH5HC94+4teDZvuWkBiAikcK1pM2DH9W6iCNDoGpHxUdPGTNPw@mail.gmail.com.
Please take a look.
Thanks,
Nitin Motiani
Google