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