| From: | Scott Marlowe <smarlowe(at)g2switchworks(dot)com> |
|---|---|
| To: | Thomas Hallgren <thhal(at)mailblocks(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: CURRENT_TIMESTAMP vs actual time |
| Date: | 2005-04-21 16:01:09 |
| Message-ID: | 1114099269.13303.24.camel@state.g2switchworks.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Thu, 2005-04-21 at 10:21, Thomas Hallgren wrote:
> Christopher J. Bottaro wrote:
> > Alvaro Herrera wrote:
> > Ahh, thanks for the tip. I guess I'll just stick with
> > timeofday()::timestamp...its more concise anyways...
> >
>
> Why use timeofday() at all? Why not now(). It will return a timestamptz
> without casts.
I think you missed the first part of the conversation, which was he
needed a type that updated inside a transaction:
# begin;
# select timeofday()::timestamptz;
2005-04-21 10:59:58.181834-05
# select now();
2005-04-21 10:59:50.286865-05
# select timeofday()::timestamptz;
2005-04-21 11:00:04.821057-05
# select now();
2005-04-21 10:59:50.286865-05
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Scott Marlowe | 2005-04-21 16:11:22 | Re: Most specific match using between |
| Previous Message | Alban Hertroys | 2005-04-21 15:59:52 | Re: CURRENT_TIMESTAMP vs actual time |