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

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Petr Korobeinikov <pkorobeinikov(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add schema-qualified relnames in constraint error messages.
Date: 2016-02-11 17:53:00
Message-ID: CAFj8pRDK9tFXRtLVG0nMC0gtiVWBjHCC5XqrG=OJSeQ5cf-Vwg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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.
>

yes

+1

Pavel

>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2016-02-11 17:53:08 Re: Performance degradation in commit ac1d794
Previous Message Robert Haas 2016-02-11 17:50:58 Re: Performance degradation in commit ac1d794