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

On Wed, Aug 19, 2009 at 3:53 AM, Tom Lane<[email protected]> wrote:
> * The expression might throw an error for some inputs, for instance
>        (1 / field) < 0.5
> which would fail on zero.  We could recover by wrapping the whole
> estimation process in a subtransaction, but that seems really expensive.
> I thought about arguing that the failure would happen anyway at runtime,
> but that doesn't hold water --- for example, the user might have just
> deleted all the rows with field = 0, and would have grounds to complain
> if the query failed; but there would still be an entry for zero in the
> histogram.

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?


--
greg
http://mit.edu/~gsstark/resume.pdf


pgsql-hackers by date:

Previous
From: Stef Walter
Date:
Subject: Re: pg_hba.conf: samehost and samenet
Next
From: Greg Stark
Date:
Subject: Re: Idea about estimating selectivity for single-column expressions