pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andre Schubert <andre@km3.de>
Cc: achill@matrix.gatewaynet.com
Cc: pgsql-sql@postgresql.org
Subject: Re: Help on indexing timestamps
Date: Mon, 10 Mar 2003 10:07:32 -0500
Message-ID: <17309.1047308852@sss.pgh.pa.us> (raw)
In-Reply-To: <20030310101750.77a1ae2f.andre@km3.de>
References: <20030307130223.5a58c132.andre@km3.de>
	<Pine.LNX.4.44.0303071416120.22117-100000@matrix.gatewaynet.com>
	<20030307134702.135fa254.andre@km3.de>
	<264.1047049503@sss.pgh.pa.us>
	<20030310101750.77a1ae2f.andre@km3.de>

Andre Schubert <andre@km3.de> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Update to 7.3, and that problem will go away.
>> 
> What is the difference between 7.2 and 7.3 related to my problem ?

7.3 is willing to index comparisons to now(), that's what ;-)

You may care to study the difference between cachable/noncachable
functions in 7.2, versus the difference between
immutable/stable/volatile functions in 7.3.  7.2 has to treat now()
as noncachable and therefore unsafe to index.  7.3 treats it as
stable and therefore safe to index.

You can work around this in 7.2 by cheating with subselects or wrapper
functions, but that's a poor substitute for a real solution.

			regards, tom lane



view thread (15+ messages)  latest in thread

Message-ID: <17309.1047308852@sss.pgh.pa.us>
Permalink:  ../17309.1047308852@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17309.1047308852@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andre@km3.de, achill@matrix.gatewaynet.com
  Subject: Re: Help on indexing timestamps
  In-Reply-To: <17309.1047308852@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox