ALTER TABLE results in "could not find cast from 3904 to 3831" - Mailing list pgsql-bugs

From Manuel Rigger
Subject ALTER TABLE results in "could not find cast from 3904 to 3831"
Date
Msg-id CA+u7OA4n2Q8G1DD5MEp+mu08ayB+ULRFrG4s_v3LhOj8f4bX-g@mail.gmail.com
Whole thread Raw
Responses Re: ALTER TABLE results in "could not find cast from 3904 to 3831"
List pgsql-bugs
Hi everyone,

Consider the following test case:

CREATE TABLE t0(c0 int4range UNIQUE, FOREIGN KEY (c0) REFERENCES t0(c0));
ALTER TABLE t0 ALTER c0 SET DATA TYPE int4range; -- ERROR:  could not
find cast from 3904 to 3831

Unexpectedly, the ALTER TABLE results in an error. If, for example,
the references to the type "int4range" are replaced by "int", the two
statements execute without error.

Best,
Manuel



pgsql-bugs by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: BUG #16079: Question Regarding the BUG #16064
Next
From: Tomas Vondra
Date:
Subject: Re: ALTER TABLE results in "could not find cast from 3904 to 3831"