Re: Date of creation and of change

Поиск
Список
Период
Сортировка
От Andreas Tille
Тема Re: Date of creation and of change
Дата
Msg-id Pine.LNX.4.21.0008231549340.22247-100000@wr-linux02.rki.de
обсуждение исходный текст
Ответ на Re: Date of creation and of change  (hlefebvre <hlefebvre@lexbase.net>)
Ответы Re: Re: Date of creation and of change
Список 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 по дате отправления:

Предыдущее
От: Andreas Tille
Дата:
Сообщение: Re: Date of creation and of change
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Null function parameters