Re: idea: storing view source in system catalogs
| От | Tom Lane |
|---|---|
| Тема | Re: idea: storing view source in system catalogs |
| Дата | |
| Msg-id | 8934.1211516228@sss.pgh.pa.us обсуждение |
| Ответ на | Re: idea: storing view source in system catalogs (Gregory Stark <stark@enterprisedb.com>) |
| Список | pgsql-hackers |
Gregory Stark <stark@enterprisedb.com> writes:
> "Tom Lane" <tgl@sss.pgh.pa.us> writes:
>> Yeah. The current restrictions were set when CREATE OR REPLACE VIEW
>> was first implemented, and at that time we didn't have very much
>> ALTER TABLE capability at all; the view restrictions mirror what we
>> could do with a table at the time. It would be worth revisiting
>> that to make it square up with what you can now do to a table.
> I thought the problem had more to do with the former lack of query
> invalidation. If someone altered the view we had no way to replan any plans
> from a former definition of the view.
Well, we had no way to replan plans that depended on characteristics of
tables, either, which meant that ALTER COLUMN TYPE was a pretty
dangerous feature too before 8.3. I don't see that altering the output
column set of a view is really much different.
> Now that we have the query cache would we know that the view had changed and
> therefore the whole query needs to be replanned from source?
Yeah, it's isomorphic AFAICS.
regards, tom lane
В списке pgsql-hackers по дате отправления: