Re: Idea about estimating selectivity for single-column expressions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Idea about estimating selectivity for single-column expressions
Date
Msg-id 21371.1250692245@sss.pgh.pa.us
Whole thread Raw
In response to Re: Idea about estimating selectivity for single-column expressions  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> We could add another flag in pg_proc for functions which cannot throw
> an error. Perhaps all index operator class operators be required to
> use such functions too?

It would be an extremely small set.  For starters, anything that returns
a pass-by-reference data type would be out automatically --- the palloc
to return the result could hit out-of-memory.

Now maybe we could define the flag as meaning "if this does throw an
error it's okay for the calling query to fail too", which I think is
reasonable for out-of-memory type errors.  But it's getting pretty
squishy at that point, and I think we'd have a lot of problems with
mislabeled functions.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Idea about estimating selectivity for single-column expressions
Next
From: Tom Lane
Date:
Subject: Re: FDW-based dblink (WIP)