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

From Rod Taylor
Subject Re: [BUGS] BUG #1290: Default value and ALTER...TYPE
Date
Msg-id 1098296269.747.221.camel@home
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
List pgsql-hackers
On Wed, 2004-10-20 at 14:07, Tom Lane wrote:
> "PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
> > troels=# create table lookat_feature(
> > troels(#   feature_id char(4),
> > troels(#   status varchar(2) default 'TODO'

> The alternative would seem to be decreeing that this is not a bug.
> 
> Comments anyone?

I think the bug is that default takes a value which does not fit the
columns data type.

bric=# create table test (col numeric(6,2) DEFAULT '1023456632');
CREATE TABLE
bric=# insert into test default values;
ERROR:  numeric field overflow
DETAIL:  The absolute value is greater than or equal to 10^9 for field
with precision 6, scale 2.





pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #1290: Default value and ALTER...TYPE
Next
From: Andrew Dunstan
Date:
Subject: Re: tsearch2 windows make failure