Re: Functional dependencies and GROUP BY
Greg Stark <gsstark@mit.edu>
From: Greg Stark <gsstark@mit.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter_e@gmx.net>, pgsql-hackers@postgresql.org
Date: 2010-06-08T14:11:52Z
Lists: pgsql-hackers
On Tue, Jun 8, 2010 at 3:05 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Well, no, any cached plan will get invalidated if the index goes away. > The big problem with this implementation is that you could create a > *rule* (eg a view) containing a query whose validity depends on the > existence of an index. Dropping the index will not cause the rule > to be invalidated. Hm, I was incorrectly thinking of this as analogous to the cases of plans that could be optimized based on the existence of a constraint. For example removing columns from a sort key because they're unique. But this is different because not just the plan but the validity of the query itself is dependent on the constraint. -- greg