agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephan Szabo <sszabo@megazone23.bigpanda.com>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: Matthew Price <pricem@juno.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Index not being used
Date: Thu, 14 Feb 2002 19:46:38 -0500
Message-ID: <10780.1013733998@sss.pgh.pa.us> (raw)
In-Reply-To: <20020214150423.R24897-100000@megazone23.bigpanda.com>
References: <20020214150423.R24897-100000@megazone23.bigpanda.com>

Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> Something tells me that current_date is probably not in a form that's
> considered indexable.

More to the point, it's not considered a constant.

You could write
	WHERE cdate = date 'now'
instead.

			regards, tom lane



view thread (11+ messages)  latest in thread

Message-ID: <10780.1013733998@sss.pgh.pa.us>
Permalink:  ../10780.1013733998@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10780.1013733998@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, sszabo@megazone23.bigpanda.com, josh@agliodbs.com, pricem@juno.com
  Subject: Re: Index not being used
  In-Reply-To: <10780.1013733998@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox