On Sun, 10 Jun 2001, Lincoln Yeoh wrote:
> Thanks!
>
> Which is better/faster?
>
> select date_part('epoch',('now'::timestamp - somedate)::interval) from
> sometable;
>
> Or
>
> select extract (epoch from interval ('now'::timestamp - somedate)) from
> sometable;
Speedwise, I think its the same. _maybe_ the latter is faster, but I
wouldn't bet on it.
> Should I be using 'now'::timestamp or some function form of it?
No difference whether you use now() or 'now'::timestamp.
-alex