Re: idea: storing view source in system catalogs - Mailing list pgsql-hackers

From Tom Lane
Subject Re: idea: storing view source in system catalogs
Date
Msg-id 8934.1211516228@sss.pgh.pa.us
Whole thread Raw
In response to Re: idea: storing view source in system catalogs  (Gregory Stark <stark@enterprisedb.com>)
List 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 by date:

Previous
From: Gregory Stark
Date:
Subject: Re: idea: storing view source in system catalogs
Next
From: "Vishal Mailinglist"
Date:
Subject: Re: [ADMIN] Error while executing pg_dump "invalid memory alloc request size 4294967293"