Tom Lane <tgl@sss.pgh.pa.us> writes:
> Here's another interesting case to think about:
>
> ALTER TABLE ADD foo integer DEFAULT 1
> ...
> ALTER TABLE ALTER foo SET DEFAULT 2
>
> You'll have to pay the table-traversal cost on one step or the other.
A good point.
I wonder if this could be solved by recording the xid of the ALTER transaction
along with the default value. I imagine that might get complicated quickly
though.
--
greg