BUG #19724: ALTER TYPE ... ALTER ATTRIBUTE triggers internal error for base type of domain with check

Started by PG Bug reporting form27 days ago2 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

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.

#2Nitin Motiani
nitinmotiani@google.com
In reply to: PG Bug reporting form (#1)
Re: BUG #19724: ALTER TYPE ... ALTER ATTRIBUTE triggers internal error for base type of domain with check

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