REFERENCES error message complaint, suggestion

Поиск
Список
Период
Сортировка
От Karl O. Pinc
Тема REFERENCES error message complaint, suggestion
Дата
Msg-id 20040303171319.A13758@mofo.meme.com
обсуждение исходный текст
Ответы Re: REFERENCES error message complaint, suggestion  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
FYI,

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.

In PostgreSQL 7.3:

sandbox=> insert into foo (id, b) values (3, 2);
ERROR:  b_is_fkey referential integrity violation - key referenced from
foo not found in bar

(I only know that column 'b' is involved above because I
manually gave the constraint the 'b_is_fkey' name.)

Also, IIRC, CHECK constraint violations don't contain the text of
the constraint, so you're again reduced to relying on supplied
constraint names for a clue as to what went wrong.  It'd be
nice to see the constraint itself in the error message.


Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                  -- Robert A. Heinlein

В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Chaney
Дата:
Сообщение: Re: Moving from MySQL to PGSQL....some questions (multilevel
Следующее
От: "Karl O. Pinc"
Дата:
Сообщение: Re: Moving from MySQL to PGSQL....some questions (multilevel