diff options
Diffstat (limited to 'django/db/backends/postgresql_psycopg2/base.py')
| -rw-r--r-- | django/db/backends/postgresql_psycopg2/base.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/django/db/backends/postgresql_psycopg2/base.py b/django/db/backends/postgresql_psycopg2/base.py index 7725b0c7a0..33f885d50c 100644 --- a/django/db/backends/postgresql_psycopg2/base.py +++ b/django/db/backends/postgresql_psycopg2/base.py @@ -62,6 +62,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): supports_combined_alters = True nulls_order_largest = True closed_cursor_error_class = InterfaceError + has_case_insensitive_like = False class DatabaseWrapper(BaseDatabaseWrapper): @@ -83,6 +84,11 @@ class DatabaseWrapper(BaseDatabaseWrapper): 'iendswith': 'LIKE UPPER(%s)', } + pattern_ops = { + 'startswith': "LIKE %s || '%%%%'", + 'istartswith': "LIKE UPPER(%s) || '%%%%'", + } + Database = Database def __init__(self, *args, **kwargs): |
