Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#10906 closed (fixed)

Aggregation support absent on postgres < 8.2

Reported by: Richard Davies <richard.davies@…> Owned by:
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: richard.davies@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

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?

Attachments (1)

10906-r10633-detect-early-postgresql.diff (2.6 KB) - added by Richard Davies <richard.davies@…> 6 years ago.
Improve error message and avoid tests with errors on Postgresql <8.2

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by Richard Davies <richard.davies@…>

Improve error message and avoid tests with errors on Postgresql <8.2

comment:1 Changed 6 years ago by Richard Davies <richard.davies@…>

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

(I meant to refer to #10142 and #10289, not [10142])

comment:2 Changed 6 years ago by russellm

  • Triage Stage changed from Unreviewed to Accepted

This definitely needs to be done, but I'm going to wait until resolution on #10842 before committing, as this will make version comparisons much more robust.

comment:3 Changed 6 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(In [10731]) Fixed #10906 -- Added a check for PostgreSQL pre 8.2 when using StdDev/Variance aggregates. Thanks to Richard Davies for the report and patch.

comment:4 Changed 4 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

comment:5 Changed 3 years ago by akaariai

  • Component changed from ORM aggregation to Database layer (models, ORM)
Note: See TracTickets for help on using tickets.
Back to Top