On Tue, 15 Mar 2016 19:33:32 -0600
"Keith Medcalf" <kmedcalf at dessus.com> wrote:

> > Yes, if the string cannot be represented as an integer, CAST should
> > raise a range error.  That spares the application from applying the
> > same test in an ad hoc and inconsistent way.
> 
> Since there is no way to "trap" such errors, out-of-bounds
> conversions should return NULL.  J

No way to trap an error condition for a SELECT statement?  Is that what
you mean?  

To my way of thinking, a CAST range error is a constraint violation.
Why can sqlite3_step not return SQLITE_CONSTRAINT_CHECK?  

> ust as attempting to divide by zero returns NULL.

In SQLite, yeah.  Other DBMSs don't make that mistake.  It's at the
top of my list for why SQLite is unsuitable for quantitative work.  

--jkl

Reply via email to