Re: time - Mailing list pgsql-sql

From Tom Lane
Subject Re: time
Date
Msg-id 11040.1131650023@sss.pgh.pa.us
Whole thread Raw
In response to Re: time  (Michael Fuhr <mike@fuhr.org>)
Responses Re: time
Re: time
List 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 by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: time
Next
From: Michael Fuhr
Date:
Subject: Re: time