Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] BUG #1290: Default value and ALTER...TYPE

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Troels Arvin <troels(at)arvin(dot)dk>, pgsql-bugs(at)postgresql(dot)org,pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] BUG #1290: Default value and ALTER...TYPE
Date: 2004-10-24 23:41:37
Message-ID: 1098661296.12577.24.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-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



In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2004-10-24 23:50:41
Subject: Re: [HACKERS] BUG #1290: Default value and ALTER...TYPE
Previous:From: Tom LaneDate: 2004-10-24 23:04:25
Subject: Re: Compile error on 7.2.6/contrib/seg

pgsql-bugs by date

Next:From: Tom LaneDate: 2004-10-24 23:50:41
Subject: Re: [HACKERS] BUG #1290: Default value and ALTER...TYPE
Previous:From: Dennis BjorklundDate: 2004-10-24 15:10:37
Subject: Re: [HACKERS] BUG #1290: Default value and ALTER...TYPE

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group