summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql_psycopg2/operations.py
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2011-10-14 21:49:43 +0000
committerAymeric Augustin <aymeric.augustin@m4x.org>2011-10-14 21:49:43 +0000
commit246580573d7f1226aca39615dbf39956c520e6d7 (patch)
treef0c7e8133eaba9c4f1ba49a01c105f6f1cec5ab6 /django/db/backends/postgresql_psycopg2/operations.py
parent69e1e6187a1263cdabbc0c177a1e08b1a8107a2c (diff)
downloaddjango-246580573d7f1226aca39615dbf39956c520e6d7.tar.gz
Fixed #12308 -- Added tablespace support to the PostgreSQL backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16987 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/postgresql_psycopg2/operations.py')
-rw-r--r--django/db/backends/postgresql_psycopg2/operations.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/django/db/backends/postgresql_psycopg2/operations.py b/django/db/backends/postgresql_psycopg2/operations.py
index c3a23c2073..acfeeaf7ac 100644
--- a/django/db/backends/postgresql_psycopg2/operations.py
+++ b/django/db/backends/postgresql_psycopg2/operations.py
@@ -99,6 +99,12 @@ class DatabaseOperations(BaseDatabaseOperations):
else:
return []
+ def tablespace_sql(self, tablespace, inline=False):
+ if inline:
+ return "USING INDEX TABLESPACE %s" % self.quote_name(tablespace)
+ else:
+ return "TABLESPACE %s" % self.quote_name(tablespace)
+
def sequence_reset_sql(self, style, model_list):
from django.db import models
output = []