Re: View's plan not taking advantage of WHERE? - Mailing list pgsql-general

From Scott Marlowe
Subject Re: View's plan not taking advantage of WHERE?
Date
Msg-id CAOR=d=1QZr3o_tdU+LEKXEJW2=jhnR6v6Ld48donaz=sA7+dVQ@mail.gmail.com
Whole thread Raw
In response to Re: View's plan not taking advantage of WHERE?  (Mike Summers <msummers57@gmail.com>)
Responses Re: View's plan not taking advantage of WHERE?  (Mike Summers <msummers57@gmail.com>)
List pgsql-general
On Wed, Jun 5, 2013 at 5:31 AM, Mike Summers <msummers57@gmail.com> wrote:
> It appears that the culprit is a cached query plan, the tables in the UNION
> have changed and no long match however the View does not throw a "each UNION
> query must have the same number of columns" error.
>
> Is there a way to force the View's query plan to be updated on each access?

In postgresql, a view is simply a re-write driven by a rule. So when
you use it it always creates a new plan. Are you sure you don't have >
1 view def in another schema or something?


pgsql-general by date:

Previous
From: Mike Summers
Date:
Subject: Re: View's plan not taking advantage of WHERE?
Next
From: Mike Summers
Date:
Subject: Re: View's plan not taking advantage of WHERE?