Re: time

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: time
Дата
Msg-id 11040.1131650023@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: time  (Michael Fuhr <mike@fuhr.org>)
Ответы Re: time  (Michael Fuhr <mike@fuhr.org>)
Re: time  ("Tadej Kanizar" <Tadej.Kanizar@sagit-server.com>)
Список pgsql-sql
Michael Fuhr <mike@fuhr.org> writes:
> Am I missing something?  Is there a reason not to simply cast the
> timestamp value to time?

> test=> select now()::time;
>        now       
> -----------------
>  11:19:19.892125
> (1 row)

> test=> select cast(now() as time);
>        now       
> -----------------
>  11:19:19.892125
> (1 row)

I think the OP was trying to use the functional cast syntaxtime(now())
which worked long ago, but has not since we added the
SQL-spec time precision syntax.
        regards, tom lane


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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: time
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: time