BUG #13195: ALTER TABLE with DEFAULT NULL is different than implicit default - Mailing list pgsql-bugs

From autarch@urth.org
Subject BUG #13195: ALTER TABLE with DEFAULT NULL is different than implicit default
Date
Msg-id 20150429165621.2561.8175@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #13195: ALTER TABLE with DEFAULT NULL is different than implicit default  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      13195
Logged by:          Dave Rolsky
Email address:      autarch@urth.org
PostgreSQL version: 9.2.10
Operating system:   Linux
Description:

If I have a very large table (or set of partitioned tables) and run "ALTER
TABLE foo ADD COLUMN bar text DEFAULT NULL", Pg takes several hours to
complete this statement. If I simply remove the "DEFAULT NULL" clause, I
will get what seems to be the exact same outcome in a fraction of a second.

Ideally, the "DEFAULT NULL" would be optimized away. But maybe the two
statements really are different in some way I can't see, in which case it'd
be great if Pg could detect this case and warn that this will take forever
with a suggestion that you can drop the "DEFAULT NULL (see X
documentation)."

Cheers,

-dave

pgsql-bugs by date:

Previous
From: "bzb.dev001@gmail.com"
Date:
Subject: Re: BUG #13188: .pgpass does not work
Next
From: "bzb.dev001@gmail.com"
Date:
Subject: Re: BUG #13188: .pgpass does not work