Is it just me, or is Sqlite3 goofy?

Fredrik Lundh fredrik at pythonware.com
Tue Sep 12 13:22:54 CEST 2006


Steve Holden wrote:

> Sure. But if you go back to the start of the thread you'll remember the 
> OP was originally complaining that SQLite was being promoted in the 
> Python docs as SQL compliant. It clearly isn't if its response to the 
> insertion of a data value that conflicts with the declared column type 
> is to store a value whose type is something else.

the standard actually says "If the value of any input parameter provided 
by the SQL-agent falls outside the set of allowed values of the data 
type of the parameter /.../ the effect is implementation-defined" so 
that's perfectly SQL92 compliant.

in fact, the phrases "is implementation-defined" and "is implementation-
dependent" occurs hundreds of times in the SQL92 standard.

it's far from obvious to me that SQL92 would rule out storing everything 
as strings ("The physical representation of a value is implementation-
dependent.") and leaving it to the language binding to map things back 
to the host language types in whatever way it wants ("Each host language 
has its own data types, which are separate and distinct from SQL data 
types", the above quotation, and so on).

looks like the real problem here is that some people think that 
"implementation-defined" means "works as it did in that other database 
I'm using", and not "specified by the implementor for each particular 
SQL-implementation".  that's not how standards work; if something's 
explicitly left undefined, it's not something you can rely on.

</F>




More information about the Python-list mailing list