From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
Cc: | 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-01-06 02:41:36 |
Message-ID: | 4032.1452048096@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2016-01-06 02:42:46 | Re: No Issue Tracker - Say it Ain't So! |
Previous Message | Jim Nasby | 2016-01-06 02:36:49 | Re: Add schema-qualified relnames in constraint error messages. |