Re: View's plan not taking advantage of WHERE?

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Mike Summers <msummers57(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: View's plan not taking advantage of WHERE?
Date: 2013-06-05 11:53:31
Message-ID: CAOR=d=1QZr3o_tdU+LEKXEJW2=jhnR6v6Ld48donaz=sA7+dVQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jun 5, 2013 at 5:31 AM, Mike Summers <msummers57(at)gmail(dot)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?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Summers 2013-06-05 12:01:43 Re: View's plan not taking advantage of WHERE?
Previous Message Mike Summers 2013-06-05 11:31:52 Re: View's plan not taking advantage of WHERE?