Re: Possible enhancement : replace view ?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Possible enhancement : replace view ?
Дата
Msg-id 200208140334.g7E3YSa25198@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Possible enhancement : replace view ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Ah, that's why it wasn't in my mailbox.  Gavin,

http://groups.google.com/groups?hl=en&lr=&ie=ISO-8859-1&q=replace+view+gavin&btnG=Google+Search&meta=group%3Dcomp.databases.postgresql.*


Gavin Sherry <swm@linuxworld.com.au> writes:
> It passes all regression tests. There's only one really sketchy part of
> the patch: UpdateAttributeTuples(). This routine is fairly dangerous since
> it simply removes a given relid's pg_attribute entries and creates a new
> set basic on a given TupleDesc. Naturally, it is only useful for views.

You can NOT allow CREATE OR REPLACE VIEW to change the tupledesc of the
view, so I stopped reading right here --- take it out and install
prevention instead.  Why do you think that REPLACE VIEW is interesting?
It's so you can modify a view without breaking things that depend on it
... and things that depend on it depend on the tupledesc.  This is
exactly analogous to not allowing REPLACE FUNCTION to change the return
type of the function.
                       regards, tom lane
---------------------------------------------------------------------------

Tom Lane wrote:
> Gavin Sherry <swm@linuxworld.com.au> writes:
> > I submitted a patch for this a few days ago. Did it not hit pgsql-patches?
> 
> It did ... I had some gripes about it ... I thought you were working on
> the gripes?
> 
>             regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org
> 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Temporary Views
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Temporary Views