Opened 6 years ago

Closed 6 years ago

#13821 closed (fixed)

Tests don't pass on python2.4 and 2.5 on postgresql

Reported by: Paul McMillan Owned by: Paul McMillan
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Trunk r13400 on Ubuntu 8.04, python2.5 (or 2.4) with psycopg2 (or backends.postgresql) on PostgreSQL 8.3.

The test suite doesn't pass, with errors related to database flushing failures. Running one of the problem tests individually (modeltests.unmanaged_models) returns a different set of errors suggesting that some objects are not getting properly saved to the DB, so the flush command can't remove them and throws the error.

This problem with saving doesn't seem to be universal, as most of the tests do pass.

I'll continue to work on figuring out exactly why this is failing.

Attachments (2)

pg_fix_get_serial_sequence.diff (2.5 KB) - added by Paul McMillan 6 years ago.
13832.diff (3.5 KB) - added by Simon Meers 6 years ago.
Uses quote_name, and includes specific regression tesf for uppercase characters in app names

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by Paul McMillan

comment:1 Changed 6 years ago by Paul McMillan

Component: Testing frameworkDatabase layer (models, ORM)
Has patch: set
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Status: newassigned
Triage Stage: UnreviewedAccepted

cramm on #django-dev tracked the problem down. Calls to pg_get_serial_sequence have an odd behavior and need another layer of quotes to retain capitalization.

More notes on that here:
http://archives.postgresql.org/pgsql-hackers/2004-10/msg00964.php
http://archives.postgresql.org/pgsql-bugs/2007-01/msg00099.php

The attached patch passes the full test suite on the reported system as well as on python2.6 with PostgreSQL 8.4.

Changed 6 years ago by Simon Meers

Attachment: 13832.diff added

Uses quote_name, and includes specific regression tesf for uppercase characters in app names

comment:2 Changed 6 years ago by Russell Keith-Magee

Resolution: fixed
Status: assignedclosed

(In [13450]) Fixed #13821 -- Added a double-quoting to the PostgreSQL sequence reset code. Thanks to PaulM for the report, and to PaulM and Simon Meers for their work on the patch.

Note: See TracTickets for help on using tickets.
Back to Top