Re: About "Allow VIEW/RULE recompilation when the underlying tables change" - Mailing list pgsql-hackers

From Robert Haas
Subject Re: About "Allow VIEW/RULE recompilation when the underlying tables change"
Date
Msg-id 603c8f070912181917p333b25a3i9f368c160b5ae099@mail.gmail.com
Whole thread Raw
In response to About "Allow VIEW/RULE recompilation when the underlying tables change"  ("suzhiyang" <suzhiyang@gmail.com>)
Responses Re: About "Allow VIEW/RULE recompilation when the underlying tables change"  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Dec 18, 2009 at 9:58 PM, suzhiyang <suzhiyang@gmail.com> wrote:
> I'm doing the Todo List's "Allow VIEW/RULE recompilation when the underlying
> tables change ". I've a very simple idea that I save the "create view"
> query_string in systable. When I found that I select from a view, I drop the
> view and recreate the view by execute the source query_string. Then go on
> execute this "select from a view" and will get the right answer. My problem
> is that how could I get the orginal query which user typed to postgres?
> Er, maybe drop and recreate the view is an ugly idea...Is there any better
> methods to do recompilation?

I am not sure what this TODO item is supposed to refer to, but saving
the query string and re-executing it is clearly not acceptable.   What
if a column or table or function referenced in the query has been
renamed since the view/rule was created?

...Robert


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Largeobject Access Controls (r2460)
Next
From: "suzhiyang"
Date:
Subject: Re: Re: [HACKERS] About "Allow VIEW/RULE recompilation when theunderlying tables change"