Opened 13 years ago
Closed 13 years ago
#18334 closed Bug (fixed)
BaseDatabaseOperations._supports_stddev prevents enabling supports_stddev
Reported by: | Michael Manfre | Owned by: | Claude Paroz |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | stddev |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
BaseDatabaseOperations._supports_stddev() doesn't return a value, which disables supports_stddev for all backends, except sqlite3 (overrides it the function).
Attachments (2)
Change History (9)
by , 13 years ago
Attachment: | django-ticket18334.diff added |
---|
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Needs tests: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
It would be nice to have a test for this, at least for PostgreSQL.
comment:3 by , 13 years ago
Stddev tests already exist in aggregation_regress. They are currently being skipped by postgres and oracle because those backends are incorrectly reporting that supports_stddev = False.
comment:4 by , 13 years ago
Owner: | changed from | to
---|
comment:6 by , 13 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Seems like this will fix the issue. I tested the patch on all core backends and no errors spotted, and I added an assert(False) to the stddev test and got a failure on PostgreSQL. So, LGTM.
I spotted that the SQLite test could be simplified to select stddev(1) instead of the create table - select - drop table thing. But, not this ticket's problem...
comment:7 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I haven't checked previous versions to see when this broke.