Re: Add schema-qualified relnames in constraint error messages.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add schema-qualified relnames in constraint error messages.
Дата
Msg-id 4032.1452048096@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Add schema-qualified relnames in constraint error messages.  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Ответы Re: Add schema-qualified relnames in constraint error messages.  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-hackers
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
> does psql do anything with those fields? ISTM the biggest use for this 
> info is someone sitting at psql or pgAdmin.

Sure, if you turn up the error verbosity.

regression=# create table foo (f1 int primary key);
CREATE TABLE
regression=# create table bar (f1 int references foo);
CREATE TABLE
regression=# insert into bar values(1);
ERROR:  insert or update on table "bar" violates foreign key constraint "bar_f1_fkey"
DETAIL:  Key (f1)=(1) is not present in table "foo".
regression=# \set VERBOSITY verbose
regression=# insert into bar values(1);
ERROR:  23503: insert or update on table "bar" violates foreign key constraint "bar_f1_fkey"
DETAIL:  Key (f1)=(1) is not present in table "foo".
SCHEMA NAME:  public
TABLE NAME:  bar
CONSTRAINT NAME:  bar_f1_fkey
LOCATION:  ri_ReportViolation, ri_triggers.c:3326

I can't speak to pgAdmin, but if it doesn't make this info available
the answer is to fix pgAdmin ...
        regards, tom lane



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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: Add schema-qualified relnames in constraint error messages.
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: No Issue Tracker - Say it Ain't So!