Re: Question about a query plan

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Bill Moseley <moseley(at)hank(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question about a query plan
Date: 2005-09-16 21:51:09
Message-ID: 20050916215102.GA29791@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Sep 16, 2005 at 10:18:19AM -0700, Bill Moseley wrote:
> On Fri, Sep 16, 2005 at 10:02:28AM -0500, Thomas O'Connell wrote:
> > For older versions of postgres, it's recommended that you determine
> > the time in the client and use constant data in your query.
>
> Interesting. I have a few VIEWs that include now(), but I guess I
> could adjust and pass in the date from the client.

I sometimes use the constant 'now' instead, since it obviously isn't
mutable. It's a bit tricky because sometimes it expands when you define
the statement. You have to do 'now'::text usually and even then you
should check...
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2005-09-16 23:10:27 Re: pg_ctl reload breaks our client
Previous Message Marc Munro 2005-09-16 21:16:29 Re: pg_ctl reload breaks our client