Re: definative way to place secs from epoc into timestamp

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: definative way to place secs from epoc into timestamp
Дата
Msg-id 13466.1109795186@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: definative way to place secs from epoc into timestamp  (Bret Hughes <bhughes@elevating.com>)
Ответы Re: definative way to place secs from epoc into timestamp
Список pgsql-sql
Bret Hughes <bhughes@elevating.com> writes:
> Thanks for the feed back tom  I say that but I could not believe that I
> have to jump through all those hoops on an insert or update

> update mytable set (lasttime =(SELECT TIMESTAMP WITH TIME ZONE 'epoch' +
> 982384720 * INTERVAL '1 second') )

> is this what you are saying I need to do?

You can make a function that embodies whichever semantics you want.

> also, what is happening with abstime(982384720)?  this works as expected
> (by me ).  Is this a bad idea?

It won't be there forever.
        regards, tom lane


В списке pgsql-sql по дате отправления:

Предыдущее
От: Bret Hughes
Дата:
Сообщение: Re: definative way to place secs from epoc into timestamp
Следующее
От: PFC
Дата:
Сообщение: Re: Postgres performance