Skip site navigation (1) Skip section navigation (2)

Re: Partial Index Too Literal?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Phillip Mills <pmills(at)systemcore(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Partial Index Too Literal?
Date: 2008-06-26 19:50:59
Message-ID: 20080626195059.GE27678@svana.org (view raw or flat)
Thread:
Lists: pgsql-general
On Thu, Jun 26, 2008 at 03:24:41PM -0400, Phillip Mills wrote:
> dev=# explain analyze select * from result where active = true;
> dev=# explain analyze select * from result where active is true;

> This is version 8.2.6.  Is there something I'm missing that could make these
> queries ever produce different results?

As usual the counter example is when there a NULL where the two
expressions arn't equal. That this doesn't affect the result of the
query is I suppose a deficiency of the expression comparitor...

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog(at)svana(dot)org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while 
> boarding. Thank you for flying nlogn airlines.

In response to

pgsql-general by date

Next:From: Lennin CaroDate: 2008-06-26 20:08:21
Subject: Re: Partial Index Too Literal?
Previous:From: Phillip MillsDate: 2008-06-26 19:24:41
Subject: Partial Index Too Literal?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group