From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Benjamin Coutu <ben(dot)coutu(at)zeyos(dot)com> |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: Domain Constraint Violation Error Messages |
Date: | 2018-07-25 15:59:16 |
Message-ID: | 20180725155916.rz47nbyh2jwggdgo@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Benjamin Coutu | 2018-07-25 16:06:21 | Re: Domain Constraint Violation Error Messages |
Previous Message | Benjamin Coutu | 2018-07-25 15:51:21 | Re: Domain Constraint Violation Error Messages |