Re: REFERENCES error message complaint, suggestion
От | Tom Lane |
---|---|
Тема | Re: REFERENCES error message complaint, suggestion |
Дата | |
Msg-id | 20851.1078371468@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | REFERENCES error message complaint, suggestion ("Karl O. Pinc" <kop@meme.com>) |
Ответы |
Re: REFERENCES error message complaint, suggestion
|
Список | pgsql-general |
"Karl O. Pinc" <kop@meme.com> writes: > It'd be nice if the error message from a REFERENCES > constraint mentioned the column name into which > the bad data was attempted to be inserted. You mean like this? regression=# create table foo (pk int primary key); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo" CREATE TABLE regression=# create table bar (fk int references foo); CREATE TABLE regression=# insert into bar values(1); ERROR: insert or update on table "bar" violates foreign key constraint "$1" DETAIL: Key (fk)=(1) is not present in table "foo". regression=# select version(); version --------------------------------------------------------------- PostgreSQL 7.4.1 on hppa-hp-hpux10.20, compiled by GCC 2.95.3 (1 row) regards, tom lane
В списке pgsql-general по дате отправления: