Re: Invalidating dependent views and functions - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Invalidating dependent views and functions
Date
Msg-id AANLkTin6-mG8ZaHqxK-k2_HGXIB3xoT8v5ZTfU7XV69B@mail.gmail.com
Whole thread Raw
In response to Re: Invalidating dependent views and functions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Apr 30, 2010 at 10:38 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Scott Bailey <artacus@comcast.net> writes:
>> Proposal: Add an invalid flag to pg_class. Invalid objects would be
>> ignored when doing dependency checks for DDL statements. And an
>> exception would be thrown when an invalid object is called.
>
> IMO, the way Oracle does this pretty much sucks, and shouldn't be
> emulated.  If they know how to recompile the view, why don't they
> just do it?  What you describe is about as user-unfriendly as it
> gets.

I agree that the way Oracle does it pretty much sucks.  On the other
hand, I also sympathize with the OP's difficulties in managing a large
nest of views.  I'm not really sure what can be done to improve the
situation, but it would be nice to come up with some better ideas.  It
would almost be nice if there were a way to do ALTER TABLE ... ALTER
COLUMN ... TYPE ... CASCADE and have it trickle down into the
dependent views, but that might be too much black magic (or just too
hard to implement).  Still, I don't really have a better idea.

...Robert


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Add column if not exists (CINE)
Next
From: Robert Haas
Date:
Subject: Re: pg_migrator to /contrib in a later 9.0 beta