On Wed, Feb 22, 2017 at 5:50 PM, Richard Hipp <d...@sqlite.org> wrote:

> On 2/22/17, Dominique Devienne <ddevie...@gmail.com> wrote:
> >
> > Could we please have the CHECK constraint name,
> > in addition to the table name, in case of a failure?
> >
> > Pushing my luck a little bit: any chance to be able to pinpoint the
> > offending rows, similar to how foreign_key_check does it?
>
> CHECK constraint failures are suppose to be exceedingly rare.
> Elaborate error messages that pinpoint the problem are possible, but
> they increase the library complexity and footprint unnecessarily.  In
> the rare event that you encounter a CHECK constraint failure, you can
> go back and figure out which constraint and which row is at fault
> using ordinary queries.


OK on the rows-at-fault. No problem.

But I have some tables with many check constraints, one per column at least
basically.
Could we please at least have the constraint name? Assuming it's readily
available
at the time you generate the message, that would narrow down the "search
field"
to a single one of those CHECK constraint. And that would make it
consistent with
the normal message from an insert failure. Consistency is good right? --DD
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to