Closed Bug 577793 Opened 14 years ago Closed 14 years ago

Improve the Pg SERIAL-altering code now that we require 8.3

Categories

(Bugzilla :: Database, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.2

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file, 1 obsolete file)

There were some things we couldn't quite do right with SERIAL type fields when doing an ALTER on them, in older versions of Pg. However, Pg 8.3 pretty much adds all the support we needed, so we should use the newer, better support.
Attached patch v1Splinter Review
We now use ALTER SEQUENCE instead of ALTER TABLE to rename sequences--this fixes the column defaults without us having to do anything else. When adding a new sequence, we do "OWNED BY table.column" so that the sequence will be automatically dropped if the table or column get dropped. We now actually drop the sequence if a column stops being serial (which hasn't happened in Pg-support history, but could in the future).
Assignee: database → mkanat
Status: NEW → ASSIGNED
Attachment #456656 - Flags: review+
Flags: approval+
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/ modified Bugzilla/DB/Schema/Pg.pm Committed revision 7318.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Blocks: 578197
Okay, this needs one more fix because it can be considered complete.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch Extra Fix (obsolete) — Splinter Review
Attachment #456975 - Flags: review+
Comment on attachment 456975 [details] [diff] [review] Extra Fix Wrong bug.
Attachment #456975 - Attachment is obsolete: true
Attachment #456975 - Flags: review+
I reopened the wrong bug.
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: