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

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Add schema-qualified relnames in constraint error messages.
Дата
Msg-id CA+TgmoboJK14_NgUYeq=sXf_0xjcj2u62At3VmRvpJz4Sb=3fw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add schema-qualified relnames in constraint error messages.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Add schema-qualified relnames in constraint error messages.  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: Add schema-qualified relnames in constraint error messages.  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
On Tue, Jan 5, 2016 at 10:16 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Jim Nasby <Jim.Nasby@bluetreble.com> writes:
>> FWIW, I suspect very few people know about the verbosity setting (I
>> didn't until a few months ago...) Maybe psql should hint about it the
>> first time an error is reported in a session.
>
> Actually, what'd be really handy IMO is something to regurgitate the
> most recent error in verbose mode, without making a permanent session
> state change.  Something like
>
> 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=# \saywhat
> 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
> regression=#

Wow, that's a fabulous idea.  I see Oleksandr has tried to implement
it, although I haven't looked at the patch.  But I think this would be
REALLY helpful.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Yury Zhuravlev
Дата:
Сообщение: Re: GinPageIs* don't actually return a boolean
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Performance degradation in commit ac1d794