Re: Performance of a query - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Performance of a query
Date
Msg-id 20030612004435.GA20433@wolff.to
Whole thread Raw
In response to Performance of a query  (Edmund Dengler <edmundd@eSentire.com>)
Responses Re: Performance of a query
List pgsql-general
On Wed, Jun 11, 2003 at 20:11:02 -0400,
  Edmund Dengler <edmundd@eSentire.com> wrote:
> Greetings all!
>
> So I have had a look at the documentation to see what options I have in
> separating the "select now() - '2 hours'::interval" from the rest of my
> query. As far as I can tell, I have the following options:

How about using local_timestamp instead of now? It returns a timestamp
instead of a timestamptz and I suspect will do what you want.
Whatever you are comparing it to will also need to be of type
timestamp. I suspect that you should be careful when setting timezone in your
transaction when doing things this way.

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Generalizing max and min
Next
From: Edmund Dengler
Date:
Subject: Re: Performance of a query