Code

Opened 7 years ago

Closed 7 years ago

#4057 closed (fixed)

unquoted sequence names in postgresql and postgresql_psycopg2 backends

Reported by: Gary Wilson <gary.wilson@…> Owned by: adrian
Component: Database layer (models, ORM) Version: master
Severity: Keywords: flush
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

get_sql_flush() functions are not quoting sequence names, causing an error for table names with an uppercase letter:

ProgrammingError: ERROR:  relation "fixtures_regress_plant_id_seq" does not exist

ALTER SEQUENCE Fixtures_regress_plant_id_seq RESTART WITH 1;

Attachments (1)

4057.diff (3.8 KB) - added by Gary Wilson <gary.wilson@…> 7 years ago.
fix + regression test

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by Gary Wilson <gary.wilson@…>

fix + regression test

comment:1 Changed 7 years ago by Gary Wilson <gary.wilson@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

Should the test be done in a transaction or is that handled automatically?

comment:2 Changed 7 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(In [5017]) Fixed #4057 -- Fixed problem with quoting of sequence names on Postgres backends. Thanks, Gary Wilson.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.