Re: Date of creation and of change

From: Andreas Tille <tillea(at)rki(dot)de>
To: hlefebvre <hlefebvre(at)lexbase(dot)net>
Cc: PostgreSQL SQL <pgsql-sql(at)hub(dot)org>
Subject: Re: Date of creation and of change
Date: 2000-08-23 13:53:35
Message-ID: Pine.LNX.4.21.0008231549340.22247-100000@wr-linux02.rki.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)iprimus(dot)com(dot)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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2000-08-23 14:00:59 Re: Null function parameters
Previous Message Karel Zak 2000-08-23 13:48:15 Re: Using SETOF in plpgsql function