Hi all,

I've been playing around with:

pragma foreign_keys;

pragma foreign_keys = 1;

As far as I can tell, turning on foreign_keys for a database is not persistent. 
It only seems to be valid for that connection/session. So this means I have to 
prefix every command that I send to the database with a command to turn on 
foreign_keys and I therefore can't issue one-off commands, but they must be 
part of a session. Is this correct?

This worries me since any ad-hoc use of the database that does not implicitly 
turn on foreign keys is likely to mess up the data integrity.

Wouldn't it be better to have the foreign_keys setting persistent between 
sessions, so that once it's turned on, it stays turned on for all future 
sessions (unless explicitly turned off)?

Thanks,
Tom
BareFeetWare

 --
Comparison of SQLite GUI tools:
http://www.barefeetware.com/sqlite/compare/?ml

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to