From 8e84d35d38d429fb00a35fd4f770ade39d7772ec Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sun, 19 Aug 2007 23:03:38 +0000 Subject: 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 --- django/db/backends/postgresql/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'django/db/backends/postgresql/base.py') diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py index 8c06bb494e..4fec530b5b 100644 --- a/django/db/backends/postgresql/base.py +++ b/django/db/backends/postgresql/base.py @@ -66,6 +66,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() @@ -137,9 +140,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 -- cgit v1.3