On Thu, Mar 7, 2013 at 7:36 AM, Michael Black <mdblac...@yahoo.com> wrote:
> Personally I think this behavior is horrid.  Is there some scenario where
> this wouldn't be a latent bug?

I don't like it either.  I also share Simon's (and yours!) opinion
regarding your patch: if cast be fixed at all (and it shouldn't be, in
SQLite3, for compatibility reasons) then it should be fixed to raise
an error or return NULL, not 0.

> Here's a patch against 3.7.14.1 which behaves the way it should IMHO
> Though I think it should actually throw an error when not parseable
> correctly.

Right.  But it's almost certainly too late to fix this in SQLite3.
Maybe with a PRAGMA?

The current behavior of CAST seems best suited for a function, not for CAST.

> Why is this behavior allowed now?

Someone from the SQLite team might be able to tell you, but my guess
is that this is academic now.

Nico
--
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to