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

Re: BETWEEN Help

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>,pgsql-patches(at)postgresql(dot)org
Subject: Re: BETWEEN Help
Date: 2002-04-15 00:01:58
Message-ID: 24586.1018828918@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Tom Lane wrote:
>> Yup, that's one place that will need to be taught about it.

> That was actually a reason I was wondering if it was worth changing our
> current BETWEEN code.  The optimizer already is complicated and trying
> to do BETWEEN rather than the more simpler statements didn't seem like a
> win.

Actually, an explicit representation of BETWEEN will *help* the
optimizer; right now it has to try to recognize range restrictions
by matching up '>' and '<' clauses.  That's a mess already, and I
had no intention of trying to extend that logic to recognize the
clause structures that BETWEEN SYMMETRIC would put out if it weren't
a primitive node type.  But if it's a node then recognizing it is
a no-brainer.  See clausesel.c.

			regards, tom lane

In response to

Responses

pgsql-patches by date

Next:From: Bruce MomjianDate: 2002-04-15 00:06:05
Subject: Re: BETWEEN Help
Previous:From: Bruce MomjianDate: 2002-04-14 23:56:36
Subject: Re: BETWEEN Help

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