From 52b7337ed86351342384fa7ec643f8b684cd42f0 Mon Sep 17 00:00:00 2001 From: Kenichi Ishigaki Date: Wed, 21 Oct 2009 02:03:53 +0000 Subject: [PATCH] DBD::SQLite: added short explanation of SQLite's pragma --- lib/DBD/SQLite.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/DBD/SQLite.pm b/lib/DBD/SQLite.pm index fb9289d..5db8116 100644 --- a/lib/DBD/SQLite.pm +++ b/lib/DBD/SQLite.pm @@ -737,10 +737,13 @@ This is somewhat weird, but works anyway. Since SQLite 3.6.19 (released on Oct 14, 2009; bundled with DBD::SQLite 1.26_05), foreign key constraints are supported (though with some limitations). See L -for details. Note that this feature is not enabled by default. You -need to issue a pragma explicitly, or set C -attribute to the database handle (explicitly, or as a connection -attribute. See below). +for details. Though SQLite does NOT enable this feature by default yet (for backward compatibility), DBD::SQLite enables it internally. If you don't want this feature, issue a pragma to disable the feature. + + $dbh->do("PRAGMA foreign_keys = OFF"); + +=head2 Pragma + +SQLite has a set of "Pragma"s to modifiy its operation or to query for its internal data. These are specific to SQLite and are not likely to work with other DBD libraries, but you may find some of these are quite useful. DBD::SQLite actually sets some (like C above) for you when you connect to a database. See L for details. =head2 Performance