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

2004-10-21 Thread Tom Lane
Troels Arvin <[EMAIL PROTECTED]> writes: > On Wed, 20 Oct 2004 14:07:29 -0400, Tom Lane wrote: >> Hmm. What's going on here is that the stored default expression is >> actually of the form >> ('TODO'::varchar)::varchar(2) > Would it be possible to check the compatibility of a default value for >

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

2004-10-20 Thread Troels Arvin
On Wed, 20 Oct 2004 14:07:29 -0400, Tom Lane wrote: > Hmm. What's going on here is that the stored default expression is > actually of the form > ('TODO'::varchar)::varchar(2) Would it be possible to check the compatibility of a default value for the associated column? Such a check might p

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

2004-10-20 Thread Tom Lane
"PostgreSQL Bugs List" <[EMAIL PROTECTED]> writes: > troels=# create table lookat_feature( > troels(# feature_id char(4), > troels(# status varchar(2) default 'TODO' > troels(# ); > CREATE TABLE > troels=# alter table lookat_feature > troels-# alter column status type varchar(4); > ALTER TABL