Re: Possible bug in referential integrity system
От | Alexei E Korneyev |
---|---|
Тема | Re: Possible bug in referential integrity system |
Дата | |
Msg-id | 002601c017c5$50f4f1c0$03b51ed4@niva.sposad.ru обсуждение исходный текст |
Ответ на | Possible bug in referential integrity system (Richard Ellis <rellis@erols.com>) |
Список | pgsql-bugs |
Hello! Keys phrase 'NOT NULL' simple=# create table t1 (num int4 PRIMARY KEY, name text); NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 't1_pkey' for table 't1' CREATE simple=# create table t2 (ref int4 references t1 (num) NOT NULL, val text); NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) CREATE simple=# insert into t1 values (1, 'Widget1'); INSERT 80324 1 simple=# insert into t2 values ( (select num from t1 where name = 'widget2'), 'Bug?'); ERROR: ExecAppend: Fail to add null value in not null attribute ref > => create table t1 (num int4, name text); > CREATE > => create table t2 (ref int4 references t1 (num), val text); > NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) > CREATE > > => insert into t1 values (1, 'Widget1'); > INSERT 17518650 1 > > => insert into t2 values ( (select num from t1 where name = 'Widget1'), 'Valuable'); > INSERT 17518651 1 > => insert into t2 values ( (select num from t1 where name = 'widget2'), 'Bug?'); > INSERT 17518652 1 Alexei E. Korneyev alexei@niva.sposad.ru
В списке pgsql-bugs по дате отправления: