pgsql 7.4b2 bug on column defaults? - Mailing list pgsql-hackers

From Giuseppe Tanzilli - CSF
Subject pgsql 7.4b2 bug on column defaults?
Date
Msg-id 3F4F1E13.2010208@gruppocsf.com
Whole thread Raw
Responses Re: pgsql 7.4b2 bug on column defaults?
Re: pgsql 7.4b2 bug on column defaults?
List pgsql-hackers
Hi,
just testing beta2 I got strange things on default values with functions:

create table test2 (i integer, t timestamp default 'now()');

test1=# \d test2                                          Table "public.test2"Column |            Type             |
                        
 
Modifiers
--------+-----------------------------+-------------------------------------------------------------------i      |
integer                    |t      | timestamp without time zone | default '29/08/2003 
 
11:26:23.937421'::timestamp without time zone


test1=# insert into test2 values(1);
INSERT 9841455 1
test1=# insert into test2 values(1);
INSERT 9841456 1
test1=# insert into test2 values(1);
INSERT 9841457 1

test1=# select * from test2;i |             t
---+----------------------------1 | 29/08/2003 11:26:23.9374211 | 29/08/2003 11:26:23.9374211 | 29/08/2003
11:26:23.937421
(3 rows)


Seems that functions are valuated when the table is created,
It is a known change or a bug ?

thanks,
Giuseppe



-- 
-------------------------------------------------------
Giuseppe Tanzilli        g.tanzilli@gruppocsf.com
CSF Sistemi srl            phone ++39 0775 7771
Via del Ciavattino 
Anagni FR
Italy


pgsql-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: Weird constraint output
Next
From: Giuseppe Tanzilli - CSF Sistemi
Date:
Subject: Re: pgsql 7.4b2 bug on column defaults?