summaryrefslogtreecommitdiff
path: root/django/db/backends/__init__.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2009-02-02 12:03:31 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2009-02-02 12:03:31 +0000
commit65ad2132abd4c56f38c43b0ba9a23ed716733728 (patch)
tree2518f3fc6be3ac8d9256d7e5609bbddc905ffd15 /django/db/backends/__init__.py
parent2b8e768b2205793db0f0db4709b9b4674f14ada6 (diff)
Fixed #10142 -- Added docs and an exploding error message to highlight an error present in the implementation of STDDEV_POP and VAR_POP in PostgreSQL 8.2-8.2.4 that will give incorrect answers (the database function mistakenly returns sample, rather than population deviation/variance). Thanks to Vinay Sajip <vinay_sajip@yahoo.co.uk> for the report, and Ian Kelly for pointing out the cause of the problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9804 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/__init__.py')
-rw-r--r--django/db/backends/__init__.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py
index 33ec14e4d7..99f8f27ad9 100644
--- a/django/db/backends/__init__.py
+++ b/django/db/backends/__init__.py
@@ -398,6 +398,15 @@ class BaseDatabaseOperations(object):
# Default to a float
return float(value)
+ def check_aggregate_support(self, aggregate_func):
+ """Check that the backend supports the provided aggregate
+
+ This is used on specific backends to rule out known aggregates
+ that are known to have faulty implementations. If the named
+ aggregate function has a known problem, the backend should
+ raise NotImplemented.
+ """
+ pass
class BaseDatabaseIntrospection(object):
"""