mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #5226. Now we check the Oracle version and give an explicit
error when we encounter a regex operator that isn't supported on 9i or earlier. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6198 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
55d34c6cb3
commit
a6b1d65e33
2 changed files with 8 additions and 0 deletions
|
@ -816,6 +816,9 @@ def get_where_clause(lookup_type, table_prefix, field_name, value, db_type):
|
|||
return connection.ops.fulltext_search_sql(field_sql)
|
||||
elif lookup_type in ('regex', 'iregex'):
|
||||
if settings.DATABASE_ENGINE == 'oracle':
|
||||
if connection.oracle_version and connection.oracle_version <= 9:
|
||||
msg = "Regexes are not supported in Oracle before version 10g."
|
||||
raise NotImplementedError(msg)
|
||||
if lookup_type == 'regex':
|
||||
match_option = 'c'
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue