pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ódor Balázs <balazs@obiserver.hu>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14616: error message without schema
Date: Mon, 10 Apr 2017 13:09:49 -0400
Message-ID: <16289.1491844189@sss.pgh.pa.us> (raw)
In-Reply-To: <285122a5-d291-65a5-6513-1f62c981d841@obiserver.hu>
References: <20170410082737.25934.58177@wrigleys.postgresql.org>
	<15352.1491842865@sss.pgh.pa.us>
	<285122a5-d291-65a5-6513-1f62c981d841@obiserver.hu>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

=?UTF-8?B?w5Nkb3IgQmFsw6F6cw==?= <balazs@obiserver.hu> writes:
> db=# create schema test;
> CREATE SCHEMA
> db=# create domain test.testdomain as varchar(200);
> CREATE DOMAIN
> db=# create table test.testtable (col test.testdomain);
> CREATE TABLE
> db=# insert into test.testtable (col) values ('test text');
> INSERT 0 1
> db=# alter domain test.testdomain add constraint testdomain_check check 
> (value ~ 'a.+');
> ERROR:  column "col" of table "testtable" contains values that violate 
> the new constraint

The data you're after *is* available in the extended fields of that error:

db=# \errverbose 
ERROR:  23514: column "col" of table "testtable" contains values that violate the new constraint
SCHEMA NAME:  test
TABLE NAME:  testtable
COLUMN NAME:  col
LOCATION:  validateDomainConstraint, typecmds.c:2750

We've had multiple conversations about whether to include objects' schema
names in the primary error message text, and so far the answer continues
to be "no".  There seem to be more people who would find it to be clutter
than would find it to be useful.  Certainly it wouldn't make sense to
change that style decision for just this one message.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (5+ messages)  latest in thread

Message-ID: <16289.1491844189@sss.pgh.pa.us>
Permalink:  ../16289.1491844189@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16289.1491844189@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, balazs@obiserver.hu
  Subject: Re: BUG #14616: error message without schema
  In-Reply-To: <16289.1491844189@sss.pgh.pa.us>
  References: <20170410082737.25934.58177@wrigleys.postgresql.org> <15352.1491842865@sss.pgh.pa.us> <285122a5-d291-65a5-6513-1f62c981d841@obiserver.hu> <16289.1491844189@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox