Re: [HACKERS] OR clause status - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] OR clause status
Date
Msg-id 199808060435.AAA17808@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] OR clause status  ("Thomas G. Lockhart" <lockhart@alumni.caltech.edu>)
List pgsql-hackers
> > > Ran a few tests last night.   So far, works great for single,
> > > non-internal, attributes.  However, I was not able to get the query
> > > to use the table's oid index when such an index existed.   Did a
> > > VACUUM ANALYZE before the query.
> > Thomas will have to deal with this before 6.4.  The auto-casting of
> > type oid is not working.
>
> I think the OID auto-casting should be very easy (painfully easy,
> actually, if that doesn't jinx it). Once the development tree becomes
> unbroken :) Haven't finished reading mail yet, so may already work, eh?

Yes, I think there are some very good reasons to evaluate functions on
constants inside the parser.  There are some operations that look at
index selectivity that need to know the constant value, rather than
knowing if the function returns an int.  For example x > 3 looks at the
pg_statistics table to see max/min values.

You certainly don't want to be evaluating functions on constants inside
the optimizer.

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

pgsql-hackers by date:

Previous
From: "Dr. Michael Meskes"
Date:
Subject: Re: [HACKERS] Standards question
Next
From: t-ishii@sra.co.jp
Date:
Subject: Re: [HACKERS] Broken source tree