From: | "Rod Taylor" <rod(dot)taylor(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #4182: Enum in Foreign Key broken |
Date: | 2008-05-18 19:05:46 |
Message-ID: | 200805181905.m4IJ5kTA086292@wwwmaster.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 4182
Logged by: Rod Taylor
Email address: rod(dot)taylor(at)gmail(dot)com
PostgreSQL version: 8.3.1
Operating system: amd64-portbld-freebsd7.0, compiled by GCC cc (GCC) 4.2.1
20070719 [FreeBSD]
Description: Enum in Foreign Key broken
Details:
The Update in the below script results in the following
ERROR: no conversion function from some_enum to anyenum
CREATE TYPE some_enum AS ENUM('Value 1', 'Value 2');
CREATE TABLE t1
( col1 varchar(10)
, col2 some_enum
, testboolean boolean
, PRIMARY KEY(col1, col2)
);
CREATE TABLE t2
( col1 varchar(10)
, col2 some_enum
, PRIMARY KEY(col1, col2)
, FOREIGN KEY (col1, col2) REFERENCES t1(col1, col2) on update cascade on
delete restrict
);
INSERT INTO t1 VALUES ('varcharval', 'Value 1');
INSERT INTO t1 VALUES ('varcharval', 'Value 2');
INSERT INTO t2 VALUES ('varcharval', 'Value 1');
UPDATE t1 SET testboolean = false;
-- ERROR: no conversion function from some_enum to anyenum
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-05-18 20:17:22 | Re: BUG #4180: PANIC while PQExec on Client with differen locale from database |
Previous Message | Dmitriy | 2008-05-18 17:12:08 | BUG #4181: Service PostgreSQL database server 8.2 failed to start |