Jonathon Anderson schrieb:
> What, exactly, is a "misfeature" and where is this documentation?
>
> The problem doesn't seem to occur on sqlite3 proper. Rather, it seems
> to only occur when using the python module.
>
> [EMAIL PROTECTED]:~$ sqlite3 testdb.sqlite
> SQLite version 3.5.4
> Enter ".help" for instructions
> sqlite> CREATE TABLE users(id INTEGER PRIMARY KEY, host VARCHAR(16)
> NOT NULL, name VARCHAR(16) NOT NULL);
> sqlite> INSERT INTO users (host, name) VALUES ("localhost", "monty");
> sqlite> DROP TABLE users;
> sqlite> CREATE TABLE users(id INTEGER PRIMARY KEY, host VARCHAR(16)
> NOT NULL, name VARCHAR(16) NOT NULL);
> sqlite> INSERT INTO users (host, name) VALUES (null, "python");
> SQL error: users.host may not be NULL
> sqlite>
>
Sorry for the distraction, cried to soon...
I was refering to the NULL in primary key columns feature of SQLite as
documented in:
http://sqlite.org/lang_createtable.html
"According to the SQL standard, PRIMARY KEY should imply NOT NULL.
Unfortunately, due to a long-standing coding oversight, this is not the case
in SQLite. SQLite allows NULL values in a PRIMARY KEY column. We could
change SQLite to conform to the standard (and we might do so in the future),
but by the time the oversight was discovered, SQLite was in such wide use
that we feared breaking legacy code if we fixed the problem. So for now we
have chosen to contain allowing NULLs in PRIMARY KEY columns. Developers
should be aware, however, that we may change SQLite to conform to the SQL
standard in future and should design new programs accordingly."
So basically i missed the point as you don't insert into the PK column.
Michael
--
Michael Schlenker
Software Engineer
CONTACT Software GmbH Tel.: +49 (421) 20153-80
Wiener Straße 1-3 Fax: +49 (421) 20153-41
28359 Bremen
http://www.contact.de/ E-Mail: [EMAIL PROTECTED]
Sitz der Gesellschaft: Bremen
Geschäftsführer: Karl Heinz Zachries, Ralf Holtgrefe
Eingetragen im Handelsregister des Amtsgerichts Bremen unter HRB 13215
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---