Is it just me, or is Sqlite3 goofy?

Steve Holden steve at holdenweb.com
Tue Sep 12 12:50:46 EDT 2006


Paul Boddie wrote:
> Fredrik Lundh wrote:
> 
>>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.
> 
> 
> 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."
> 
> I have used SQLite (releases 2 and 3) to my satisfaction, aware of the
> "common knowledge" around the limitations (or features) of SQLite with
> respect to data types. I'd agree with the complainant that the
> behaviour of SQLite isn't what one would expect, although I started my
> relational database experience using an Oracle database system and
> admit that I may have been spoilt, thus saving Mr Holden - a
> self-confessed Yorkshireman, I believe - the effort involved in
> pointing out the relative luxury of my professional upbringing. ;-)
> 
Spoilt? I should say so. When I were a lad we 'ad to scrape around for 
half a bit here and half a bit there - you didn't find whole bits just 
lying around in them days. As fer integers, you 'ad to save up for a 
year just to get sixteen bits. We used ter dream abaht 'avin' 64 bits, 
but there were no chance unless yer Dad were rich. Most of our strings 
were put together from characters we'd dredged out of t' canal, you 'ad 
to try and ignore the mud. We'd 'ave given our eye teeth for a bit of 
UTF-8 on a Sunday.

These kids wi' their Oracle databases didn't know they were born. I can 
remember 'avin' to optimise programs by making sure that the next 
instruction were comin' under the heads of t' drum just as the last 
instruction were finishing.

But yer tell these young folk nowadays and they just don't believe yer.

etc., etc.

pythonistical-ly y'rs  - steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd          http://www.holdenweb.com
Skype: holdenweb       http://holdenweb.blogspot.com
Recent Ramblings     http://del.icio.us/steve.holden




More information about the Python-list mailing list