Re: Functional dependencies and GROUP BY - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Functional dependencies and GROUP BY
Date
Msg-id AANLkTilCGBpVNXKwyLb59K8a-FWRrYRg2O0srHeqcXZT@mail.gmail.com
Whole thread Raw
In response to Re: Functional dependencies and GROUP BY  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Idea for getting rid of VACUUM FREEZE on cold pages
Next
From: Tom Lane
Date:
Subject: Re: Functional dependencies and GROUP BY