Re: Date of creation and of change - Mailing list pgsql-sql

From Andreas Tille
Subject Re: Date of creation and of change
Date
Msg-id Pine.LNX.4.21.0008231549340.22247-100000@wr-linux02.rki.de
Whole thread Raw
In response to Re: Date of creation and of change  (hlefebvre <hlefebvre@lexbase.net>)
Responses Re: Re: Date of creation and of change  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
On Wed, 23 Aug 2000, hlefebvre wrote:

> create table mytable( CreateDate  timestamp default timestamp('now'),
> ....);  
I've done a pg_dump <mydb> and there this line was transformed to:
 "createdat" timestamp DEFAULT '23.08.2000 15:35:16.00 CEST'::"timestamp",

I'm afraid if I ever should use this dump as a restore the following
dates will be wrong, thought.  So is there a save way to use in the
dumps?

May be the suggestion of Stuart <sgall@iprimus.com.au>
On Wed Aug 23 14:36:56 2000

> On insert, however, this will do the job.
> 
> Create table fred (joe integer, createdtime datetime not null default text
> 'now');
> 
> If you dont put the text in you get the date the table was created in all
> future inserts. The text force the current now to be used.
> ?Is this fixed in 7.0.x????

Would do a better job in this case?

What's wrong here?

Kind regards
         Andreas.



pgsql-sql by date:

Previous
From: Andreas Tille
Date:
Subject: Re: Date of creation and of change
Next
From: Tom Lane
Date:
Subject: Re: Null function parameters