[issue12997] sqlite3: PRAGMA foreign_keys = ON doesn't work
poq
report at bugs.python.org
Sun Sep 18 04:57:01 CEST 2011
poq <poq at gmx.com> added the comment:
Nope.
$ sqlite3
SQLite version 3.7.4
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> pragma foreign_keys;
0
sqlite>
$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> c = sqlite3.connect(':memory:')
>>> list(c.execute('pragma foreign_keys'))
[(0,)]
>>> list(c.execute('pragma foreign_keys = on'))
[]
>>> list(c.execute('pragma foreign_keys'))
[(1,)]
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12997>
_______________________________________
More information about the Python-bugs-list
mailing list