Re: Implied Functional index use (redux) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Implied Functional index use (redux)
Date
Msg-id 5979.1169760043@sss.pgh.pa.us
Whole thread Raw
In response to Implied Functional index use (redux)  ("Simon Riggs" <simon@2ndquadrant.com>)
Responses Re: Implied Functional index use (redux)  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-hackers
"Simon Riggs" <simon@2ndquadrant.com> writes:
> A simpler, alternate proposal is to allow the user to specify whether a
> functional index is transformable or not using CREATE or ALTER INDEX,
> with a default of not transformable. That then leaves the responsibility
> for specifying this with the user, who as we have seen is the really
> only person really capable of judging the whole case on its merits.

> e.g. CREATE INDEX fooidx ON foo (foofunc(foocol1)) 
>     [TABLESPACE ...] [ENABLE|DISABLE TRANSFORM] [WHERE ...];

This is a foot-gun and nothing else.  I hardly think the average DBA
will realize such subtleties as "numeric equality doesn't guarantee that
such-and-such works".  If it's not specified by the datatype author
it's not going to be safe.

In fact, this doesn't work anyway, since it still doesn't address the
question of which "equality" operators we think permit us to apply
the transform.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #2917: spi_prepare doesn't accept typename aliases
Next
From: Tom Lane
Date:
Subject: Re: BUG #2917: spi_prepare doesn't accept typename aliases such as 'integer'