Re: Check constraint failure messages

2021-10-03 Thread David G. Johnston
On Sun, Oct 3, 2021, 14:39 zim wrote: > An error message that includes the table name and column name would also > be helpful for non-bulk inserts: > This is not limited to domain types and comes up fairly often. In general there is agreement that the current behavior is not great but implement

Re: Check constraint failure messages

2021-10-03 Thread zim
An error message that includes the table name and column name would also be helpful for non-bulk inserts: a single insert where multiple columns of a table have the same domain type. The problem gets worse when there are inserts into multiple tables that have the same domain types (multiple sql

Re: Check constraint failure messages

2021-04-08 Thread Miles Elam
Following up in case someone else runs into this problem. I changed the function the CHECK statement called to raise a warning. Not perfect, but noticeably better. I don't get the column that failed but I do get what bad input gummed things up. CREATE OR REPLACE FUNCTION po.confirm(p_val anyelemen

RE: Check constraint failure messages

2021-04-08 Thread Kevin Brannen
From: Miles Elam Sent: Tuesday, April 6, 2021 4:19 PM Sadly, this is a cloud-managed database without direct access to 5432 from outside the VPC and bastian instances are frowned upon by our security folks. Guess I'm stuck with bisecting. Thanks for the confirmation. It'd

Re: Check constraint failure messages

2021-04-06 Thread Miles Elam
On Tue, Apr 6, 2021 at 1:59 PM Ron wrote: > > The blunt force answer is to not use bulk inserts. Try COPY; it's good at > saying which record throws an error. > Sadly, this is a cloud-managed database without direct access to 5432 from outside the VPC and bastian instances are frowned upon by o

Re: Check constraint failure messages

2021-04-06 Thread Ron
On 4/6/21 3:50 PM, Miles Elam wrote: On Tue, Apr 6, 2021 at 1:03 PM Ron > wrote: On 4/6/21 2:40 PM, Miles Elam wrote: I've got a domain that validates email addresses. When inserting a bunch of entries I simply get the error message ERROR: va

Re: Check constraint failure messages

2021-04-06 Thread Miles Elam
On Tue, Apr 6, 2021 at 1:03 PM Ron wrote: > On 4/6/21 2:40 PM, Miles Elam wrote: > > I've got a domain that validates email addresses. When inserting a bunch > of entries I simply get the error message > > ERROR: value for domain po.email violates check constraint "email_check" > SQL state: 23514

Re: Check constraint failure messages

2021-04-06 Thread Ron
On 4/6/21 2:40 PM, Miles Elam wrote: I've got a domain that validates email addresses. When inserting a bunch of entries I simply get the error message ERROR: value for domain po.email violates check constraint "email_check" SQL state: 23514 When inserting 1000+ entries in a batch, fi

Check constraint failure messages

2021-04-06 Thread Miles Elam
I've got a domain that validates email addresses. When inserting a bunch of entries I simply get the error message ERROR: value for domain po.email violates check constraint "email_check" SQL state: 23514 When inserting 1000+ entries in a batch, finding the exact entry with the problem is notice