Aggregation support absent on postgres < 8.2
Reported by: |
Richard Davies <richard.davies@…> |
Owned by: |
|
Component:
|
Database layer (models, ORM)
|
Version:
|
dev
|
Severity:
|
|
Keywords:
|
|
Cc:
|
richard.davies@…
|
Triage Stage:
|
Accepted
|
Has patch:
|
yes
|
Needs documentation:
|
no
|
Needs tests:
|
no
|
Patch needs improvement:
|
no
|
Easy pickings:
|
no
|
UI/UX:
|
no
|
Running the test suite on a clean check out of r10628, with PostgreSQL 8.1 and psycopg2, I get numerous errors from the regressiontests/aggregation_regress/, including:
ProgrammingError: function stddev_pop(integer) does not exist
ProgrammingError: function stddev_samp(integer) does not exist
ProgrammingError: function var_pop(integer) does not exist
ProgrammingError: function var_samp(integer) does not exist
I believe that these aggregates were first implemented in PostgreSQL 8.2, so either the aggregation code itself or at least the test cases should be conditional on that version.
See [10142] for an existing error message on PostgreSQL 8.2 to 8.2.4, which could perhaps be extended downwards?
Improve error message and avoid tests with errors on Postgresql <8.2