Re: time

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: Rod Taylor <pg(at)rbt(dot)ca>, Judith Altamirano Figueroa <jaltamirano(at)correolux(dot)com(dot)mx>, pgsql-sql(at)postgresql(dot)org
Subject: Re: time
Date: 2005-11-10 19:13:43
Message-ID: 11040.1131650023@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Michael Fuhr <mike(at)fuhr(dot)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 syntax
time(now())
which worked long ago, but has not since we added the
SQL-spec time precision syntax.

regards, tom lane

In response to

  • Re: time at 2005-11-10 18:21:39 from Michael Fuhr

Responses

  • Re: time at 2005-11-10 19:22:39 from Michael Fuhr
  • Re: time at 2005-11-10 19:29:07 from Tadej Kanizar

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Fuhr 2005-11-10 19:22:39 Re: time
Previous Message Jaime Casanova 2005-11-10 19:02:39 Re: [SQL] Como ejecutar una funcion insert en plpgsql....