Re: CURRENT_TIMESTAMP vs actual time - Mailing list pgsql-general

From Scott Marlowe
Subject Re: CURRENT_TIMESTAMP vs actual time
Date
Msg-id 1114099269.13303.24.camel@state.g2switchworks.com
Whole thread Raw
In response to Re: CURRENT_TIMESTAMP vs actual time  (Thomas Hallgren <thhal@mailblocks.com>)
Responses Re: CURRENT_TIMESTAMP vs actual time
List 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



pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: CURRENT_TIMESTAMP vs actual time
Next
From: Scott Marlowe
Date:
Subject: Re: Most specific match using between