Re: [BUGS] BUG #1290: Default value and ALTER...TYPE - Mailing list pgsql-hackers

From Neil Conway
Subject Re: [BUGS] BUG #1290: Default value and ALTER...TYPE
Date
Msg-id 1098661296.12577.24.camel@localhost.localdomain
Whole thread Raw
In response to Re: [BUGS] BUG #1290: Default value and ALTER...TYPE  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [BUGS] BUG #1290: Default value and ALTER...TYPE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 2004-10-25 at 00:30, Tom Lane wrote:
> Not without an initdb (to have another column to put it in).

We're already requiring an initdb for beta4; if this is the right way to
fix this (and I'm not insisting that it is), then ISTM we can just push
back beta4 a few days.

> And it
> would produce exactly the same result anyway, because the only way there
> could be implicit coercion steps at the top of the expression is because
> step 3 put them there.

Per your earlier comment: "I am not sure that this is a good idea,
however; it seems like it might alter the semantics in
unexpected ways.  (The default expression could potentially come through
differently than an actually stored value of the column would do.)"

So you can't have it both ways :)

I think it's somewhat fragile to remove the coercion by hand at ALTER
TABLE time, but as you say, I can't think of a reason why it wouldn't
work.

-Neil




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Compile error on 7.2.6/contrib/seg
Next
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #1290: Default value and ALTER...TYPE