Opened 17 years ago
Closed 17 years ago
#5055 closed (fixed)
Postgres version mismatch
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Keywords: | ||
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
The get_sql_flush() method in django/db/backends/postgresql/base.py uses "ALTER SEQUENCE". This method was added for the test system's fixture loading.
The get_sql_sequence_reset() method in core/management.py uses the older "SELECT setval()" method, available in PostgreSQL 7.3. "ALTER SEQUENCE" was added in PostgreSQL 7.4.
This patch changes both postgresql/base.py and postgresql_psycopg2/base.py to use the setval() method for resetting the sequence.
Attachments (1)
Change History (3)
by , 17 years ago
Attachment: | postgresql.diff added |
---|
comment:1 by , 17 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:2 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [6009]) Fixed #5055 -- Changed Postgres DatabaseOperations.sql_flush() to use 'SELECT setval()' instead of 'ALTER SEQUENCE', because the latter only works with Postgres 7.3+. Thanks, Don Arbow