diff options
Diffstat (limited to 'django/db/backends/postgresql')
| -rw-r--r-- | django/db/backends/postgresql/features.py | 1 | ||||
| -rw-r--r-- | django/db/backends/postgresql/operations.py | 10 |
2 files changed, 1 insertions, 10 deletions
diff --git a/django/db/backends/postgresql/features.py b/django/db/backends/postgresql/features.py index fad87081b0..67c04d89dc 100644 --- a/django/db/backends/postgresql/features.py +++ b/django/db/backends/postgresql/features.py @@ -52,6 +52,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): $$ LANGUAGE plpgsql;""" requires_casted_case_in_updates = True supports_over_clause = True + only_supports_unbounded_with_preceding_and_following = True supports_aggregate_filter_clause = True supported_explain_formats = {'JSON', 'TEXT', 'XML', 'YAML'} validates_explain_options = False # A query will error on invalid options. diff --git a/django/db/backends/postgresql/operations.py b/django/db/backends/postgresql/operations.py index ee7787c560..e8355a0e58 100644 --- a/django/db/backends/postgresql/operations.py +++ b/django/db/backends/postgresql/operations.py @@ -1,7 +1,6 @@ from psycopg2.extras import Inet from django.conf import settings -from django.db import NotSupportedError from django.db.backends.base.operations import BaseDatabaseOperations @@ -275,15 +274,6 @@ class DatabaseOperations(BaseDatabaseOperations): return "(interval '1 day' * (%s - %s))" % (lhs_sql, rhs_sql), params return super().subtract_temporals(internal_type, lhs, rhs) - def window_frame_range_start_end(self, start=None, end=None): - start_, end_ = super().window_frame_range_start_end(start, end) - if (start and start < 0) or (end and end > 0): - raise NotSupportedError( - 'PostgreSQL only supports UNBOUNDED together with PRECEDING ' - 'and FOLLOWING.' - ) - return start_, end_ - def explain_query_prefix(self, format=None, **options): prefix = super().explain_query_prefix(format) extra = {} |
