summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql/base.py
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2007-06-27 18:58:10 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2007-06-27 18:58:10 +0000
commit24512a74befc6282a1d299cab452ee9463cc2baa (patch)
tree7654c2ed72d28b7a0b9f47c0bfbebb9b75949ae6 /django/db/backends/postgresql/base.py
parent7dc8b1a1a8a8e2771f37568a125fd51a3283b043 (diff)
Fixed #1465: added support for regex lookups. Thanks, Tom Tobin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5555 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/postgresql/base.py')
-rw-r--r--django/db/backends/postgresql/base.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py
index 351b553506..611852e0dc 100644
--- a/django/db/backends/postgresql/base.py
+++ b/django/db/backends/postgresql/base.py
@@ -280,6 +280,8 @@ OPERATOR_MAPPING = {
'iexact': 'ILIKE %s',
'contains': 'LIKE %s',
'icontains': 'ILIKE %s',
+ 'regex': '~ %s',
+ 'iregex': '~* %s',
'gt': '> %s',
'gte': '>= %s',
'lt': '< %s',