summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql_psycopg2
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2007-08-19 23:03:38 +0000
committerAdrian Holovaty <adrian@holovaty.com>2007-08-19 23:03:38 +0000
commit8e84d35d38d429fb00a35fd4f770ade39d7772ec (patch)
treec083bdfa7c3acccbadccb4784f62cf8c8e024ca2 /django/db/backends/postgresql_psycopg2
parented8e392f771b415fc5b5c95a770d6a3b4f59530a (diff)
Refactored get_deferrable_sql() to DatabaseOperations.deferrable_sql(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5955 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/postgresql_psycopg2')
-rw-r--r--django/db/backends/postgresql_psycopg2/base.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/db/backends/postgresql_psycopg2/base.py b/django/db/backends/postgresql_psycopg2/base.py
index 6a471a4f04..56cb53e3bc 100644
--- a/django/db/backends/postgresql_psycopg2/base.py
+++ b/django/db/backends/postgresql_psycopg2/base.py
@@ -28,6 +28,9 @@ class DatabaseOperations(BaseDatabaseOperations):
# http://www.postgresql.org/docs/8.0/static/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC
return "DATE_TRUNC('%s', %s)" % (lookup_type, field_name)
+ def deferrable_sql(self):
+ return " DEFERRABLE INITIALLY DEFERRED"
+
class DatabaseWrapper(BaseDatabaseWrapper):
ops = DatabaseOperations()
@@ -91,9 +94,6 @@ def get_limit_offset_sql(limit, offset=None):
def get_random_function_sql():
return "RANDOM()"
-def get_deferrable_sql():
- return " DEFERRABLE INITIALLY DEFERRED"
-
def get_fulltext_search_sql(field_name):
raise NotImplementedError