Re: Re: [HACKERS] About "Allow VIEW/RULE recompilation when theunderlying tables change"

From: suzhiyang <suzhiyang(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [HACKERS] About "Allow VIEW/RULE recompilation when theunderlying tables change"
Date: 2009-12-19 03:25:22
Message-ID: 200912191125176878598@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yeah, when a column of the underlying table renamed, this re-executing must be failed...

2009-12-19

suzhiyang

发件人: Robert Haas
发送时间: 2009-12-19 11:17:44
收件人: suzhiyang
抄送: pgsql-hackers
主题: Re: [HACKERS] About "Allow VIEW/RULE recompilation when theunderlying tables change"

On Fri, Dec 18, 2009 at 9:58 PM, suzhiyang <suzhiyang(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-12-19 03:39:45 Re: About "Allow VIEW/RULE recompilation when the underlying tables change"
Previous Message Robert Haas 2009-12-19 03:17:43 Re: About "Allow VIEW/RULE recompilation when the underlying tables change"