Django

Code

Ticket #13821 (closed: fixed)

Opened 2 months ago

Last modified 1 month ago

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

Reported by: PaulM Assigned to: PaulM
Milestone: Component: Database layer (models, ORM)
Version: SVN Keywords:
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

pg_fix_get_serial_sequence.diff (2.5 kB) - added by PaulM on 06/24/10 22:53:10.
13832.diff (3.5 kB) - added by DrMeers on 06/26/10 19:43:23.
Uses quote_name, and includes specific regression tesf for uppercase characters in app names

Change History

06/24/10 22:53:10 changed by PaulM

  • attachment pg_fix_get_serial_sequence.diff added.

06/24/10 22:56:21 changed by PaulM

  • status changed from new to assigned.
  • needs_better_patch changed.
  • component changed from Testing framework to Database layer (models, ORM).
  • needs_tests changed.
  • needs_docs changed.
  • has_patch set to 1.
  • stage changed from Unreviewed to Accepted.

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.

06/26/10 19:43:23 changed by DrMeers

  • attachment 13832.diff added.

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

07/29/10 21:43:02 changed by russellm

  • status changed from assigned to closed.
  • resolution set to fixed.

(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.


Add/Change #13821 (Tests don't pass on python2.4 and 2.5 on postgresql)




Change Properties
Action