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

Re: Implied Functional index use (redux)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Implied Functional index use (redux)
Date: 2007-01-25 21:20:43
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
"Simon Riggs" <simon(at)2ndquadrant(dot)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)) 

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

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2007-01-25 21:24:54
Subject: Re: BUG #2917: spi_prepare doesn't accept typename aliases such as 'integer'
Previous:From: Tom LaneDate: 2007-01-25 21:14:19
Subject: Re: BUG #2917: spi_prepare doesn't accept typename aliases

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