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