Is it just me, or is Sqlite3 goofy?

Paul Boddie paul at boddie.org.uk
Wed Sep 13 08:15:55 EDT 2006


Magnus Lycka wrote:
> Paul Boddie wrote:
> > To be fair, that text originates in section 12.3, referring to input
> > parameters to procedures. Meanwhile, the following text (subclause
> > 13.8, "<insert statement>") appears to be more pertinent:
> >
> > "If the data type of the target identified by the i-th <column name> is
> > an exact numeric type, then the data type of the i-th item of the
> > <insert statement> shall be an exact numeric type."
>
> And SQLite behaves as expected if you provide a numeric value
> to a numeric column, right? In other words, it complies to that
> clause.

My 30 seconds' worth of consideration suggests that you have to
consider the matter the other way round: if the data type of some
column is an exact numeric type, then you should be providing a value
of such a type, not a string, for example.

> Does the spec state how the database engine should behave if the
> client breaks the requirements for insert? I guess that this is
> implementation dependent.

Well, if the client is free not to bother signalling anything about
erroneous value types, one has to wonder why there's so much of a
specification.

Paul




More information about the Python-list mailing list