BUG #1933: ADD COLUMN with DEFAULT resets table oids

Started by Duncan Crombieover 20 years ago2 messagesbugs
Jump to latest
#1Duncan Crombie
duncan@chirp.com.au

The following bug has been logged online:

Bug reference: 1933
Logged by: Duncan Crombie
Email address: duncan@chirp.com.au
PostgreSQL version: 8.0.1
Operating system: Darwin (OSX)
Description: ADD COLUMN with DEFAULT resets table oids
Details:

The following command causes all oids in the affected table to be reset to
new values:

ALTER TABLE items ADD COLUMN publish bool DEFAULT true;

The following causes no problems:

ALTER TABLE items ADD COLUMN publish bool;
ALTER TABLE items ALTER publish SET DEFAULT true;

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Duncan Crombie (#1)
Re: BUG #1933: ADD COLUMN with DEFAULT resets table oids

"Duncan Crombie" <duncan@chirp.com.au> writes:

The following command causes all oids in the affected table to be reset to
new values:
ALTER TABLE items ADD COLUMN publish bool DEFAULT true;

Yup, that's an oversight. Fix committed, will appear in 8.0.4.
Thanks for the report!

regards, tom lane