Re: Domain Constraint Violation Error Messages - Mailing list pgsql-bugs

From Andres Freund
Subject Re: Domain Constraint Violation Error Messages
Date
Msg-id 20180725155916.rz47nbyh2jwggdgo@alap3.anarazel.de
Whole thread Raw
In response to Re: Domain Constraint Violation Error Messages  (Benjamin Coutu <ben.coutu@zeyos.com>)
Responses Re: Domain Constraint Violation Error Messages
List pgsql-bugs
Hi,

On 2018-07-25 17:51:21 +0200, Benjamin Coutu wrote:
> > postgres[15271][1]=# \set VERBOSITY verbose
> > postgres[15271][1]=# INSERT INTO myusers (name, email, token) VALUES('', 'b', 'x');
> > ERROR:  23514: value for domain t_txt violates check constraint "dc_txt"
> > SCHEMA NAME:  public
> > DATATYPE NAME:  t_txt
> > CONSTRAINT NAME:  dc_txt
> > LOCATION:  ExecEvalConstraintCheck, execExprInterp.c:3521
> > Time: 0.503 ms
> > 
> > That seems to address most of your complaint? Unfortunately the column
> > name is not available, as check constraints can involve more than one
> > column.
> > 
> 
> Well, the problem is that the underlying column is not referenced, and neither is the table. That's the issue right
there.

True.  I didn't yet have my first coffee, sorry for that :).  I think
it'd possibly not be too hard to add support for naming the TABLE. Would
that already be helpful enough for you?

Greetings,

Andres Freund


pgsql-bugs by date:

Previous
From: Benjamin Coutu
Date:
Subject: Re: Domain Constraint Violation Error Messages
Next
From: Benjamin Coutu
Date:
Subject: Re: Domain Constraint Violation Error Messages