Re: Add schema-qualified relnames in constraint error messages. - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Add schema-qualified relnames in constraint error messages.
Date
Msg-id CAM3SWZSfm1EUdf7a0vNR=SAumit0FzqaA32TkKn97+HqqNskVw@mail.gmail.com
Whole thread Raw
In response to Re: Add schema-qualified relnames in constraint error messages.  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Add schema-qualified relnames in constraint error messages.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Feb 11, 2016 at 9:50 AM, Robert Haas <robertmhaas@gmail.com> wrote:
>> 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.

+1


-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Using quicksort for every external sort run
Next
From: Alex Shulgin
Date:
Subject: Re: More stable query plans via more predictable column statistics