Opened 14 years ago

Closed 14 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: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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 14 years ago.
13832.diff (3.5 KB ) - added by Simon Meers 14 years ago.
Uses quote_name, and includes specific regression tesf for uppercase characters in app names

Download all attachments as: .zip

Change History (4)

by Paul McMillan, 14 years ago

comment:1 by Paul McMillan, 14 years ago

Component: Testing frameworkDatabase layer (models, ORM)
Has patch: set
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.

by Simon Meers, 14 years ago

Attachment: 13832.diff added

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

comment:2 by Russell Keith-Magee, 14 years ago

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