ALTER TABLE results in "could not find cast from 3904 to 3831"

From: Manuel Rigger <rigger(dot)manuel(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: ALTER TABLE results in "could not find cast from 3904 to 3831"
Date: 2019-11-16 22:46:02
Message-ID: CA+u7OA4n2Q8G1DD5MEp+mu08ayB+ULRFrG4s_v3LhOj8f4bX-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tomas Vondra 2019-11-16 23:56:57 Re: ALTER TABLE results in "could not find cast from 3904 to 3831"
Previous Message Magnus Hagander 2019-11-16 13:29:58 Re: BUG #16079: Question Regarding the BUG #16064