From: | Greg Stark <gsstark(at)mit(dot)edu> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Greg Stark <gsstark(at)mit(dot)edu>, "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, iharding(at)destinydata(dot)com, CSN <cool_screen_name90001(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: POSS. FEATURE REQ: "Dynamic" Views |
Date: | 2005-08-27 19:13:21 |
Message-ID: | 873bov8a7i.fsf@stark.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Well, I just added to TODO:
>
> * Allow VIEW/RULE recompilation when the underlying tables change
>
> Is dynamic view a industry-standard name? If so, I will add it to the
> TODO.
"DYNAMIC" is something I made up.
"ALTER VIEW RECOMPILE" is Oraclese but I'm not sure what we're talking about
here is exactly the same purpose. I'm not sure it even does anything in Oracle
any more. It used to be that *any* DDL on underlying tables caused view on
them to become invalid and produce errors until they were recompiled. I think
that's changed and "recompile" may be a noop now on Oracle.
>
> Updated TODO is:
>
> * Allow VIEW/RULE recompilation when the underlying tables change
>
> Another issue is whether underlying table changes should be reflected
> in the view, e.g. should SELECT * show additional columns if they
> are added after the view is created.
I think we're 100% certain that it should not do this by default. The spec
requires it. What's unknown is whether there should be an option to do it
automatically. In my humble opinion there's no downside to having a facility
for users to do it manually though.
Hence why I separated it into three points:
> > o Add warning whenever DDL to a table affects a view dependent on that table.
> > Such as when a column is altered that is referenced in the view or when a
> > column is added if a "select *" appears in the view.
> >
> > o Add some option to CREATE VIEW to cause the above ALTER VIEW RECOMPILE to
> > automatically happen whenever DDL to a table affects the view.
> >
> > I think the first of these two are no-brainers if they're implemented well.
> > The third seems less likely to garner immediate support.
--
greg
From | Date | Subject | |
---|---|---|---|
Next Message | Mike Nolan | 2005-08-27 19:19:49 | Dumb question about 8.1 beta test |
Previous Message | Simrin Grewal | 2005-08-27 18:08:26 | An update rule affecting an after insert trigger |