diff options
| author | Justin Bronn <jbronn@gmail.com> | 2008-02-28 21:24:51 +0000 |
|---|---|---|
| committer | Justin Bronn <jbronn@gmail.com> | 2008-02-28 21:24:51 +0000 |
| commit | 22e016ff6c18a35a450519b94de63033f83e6b4f (patch) | |
| tree | 1e58cc40a636b4e4f3dcf429a5a116c015c36278 /django/db/backends/postgresql/operations.py | |
| parent | 0b52413cc926446f238fd781b4def6804f64d231 (diff) | |
gis: Merged revisions 7105-7168 via svnmerge from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@7176 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/postgresql/operations.py')
| -rw-r--r-- | django/db/backends/postgresql/operations.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/django/db/backends/postgresql/operations.py b/django/db/backends/postgresql/operations.py index 20392b238e..15ca957bac 100644 --- a/django/db/backends/postgresql/operations.py +++ b/django/db/backends/postgresql/operations.py @@ -27,6 +27,11 @@ class DatabaseOperations(BaseDatabaseOperations): def deferrable_sql(self): return " DEFERRABLE INITIALLY DEFERRED" + def field_cast_sql(self, db_type): + if db_type == 'inet': + return 'HOST(%s)' + return '%s' + def last_insert_id(self, cursor, table_name, pk_name): cursor.execute("SELECT CURRVAL('\"%s_%s_seq\"')" % (table_name, pk_name)) return cursor.fetchone()[0] |
