Re: Plan invalidation design

From: Russell Smith <mr-russ(at)pws(dot)com(dot)au>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Plan invalidation design
Date: 2007-02-18 22:48:23
Message-ID: 45D8D7B7.3060906@pws.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gregory Stark wrote:

[snip]

>
> Hm. The set of output columns could change? How?
>
> If you prepare "select *" and add a column, you're saying the query should
> start failing? That seems strange given the behaviour of views, which is that
> once parsed the list of columns is written in stone. It seems prepared queries
> should work the same way that views work and remember which physical column
> they were referring to previously. (Personally I don't like that behaviour but
> it feels like this should be consistent with it.)
>
> I guess you do have a serious problem if you redefine the type of a column or
> redefine a view (though I think you would have to drop and recreate it, CREATE
> OR REPLACE wouldn't let you change the output columns).
>

I would think it best to move towards changing views to not have output
columns set in stone. It seems unreasonable that you can add/drop/alter
columns in a table as much as you like, but you can't touch a view. I
also not excited about the current view restrictions. Which means we
don't want to start backing the idea by putting in more code that acts
in the same way.

I'm guessing from what Tom is saying, that the reason we have views set
in stone is because they are/can be an example of inlined SQL.
Particularly when views are built on views. Any further enlightenment
welcome, but probably off topic for this thread.

Russell Smith

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeremy Drake 2007-02-18 23:10:51 Re: patch adding new regexp functions
Previous Message Jacob Rief 2007-02-18 22:47:42 Re: Writing triggers in C++