Re: create or replace rule/view

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: create or replace rule/view
Дата
Msg-id 19480.1029093406@sss.pgh.pa.us
обсуждение исходный текст
Ответ на create or replace rule/view  (Gavin Sherry <swm@linuxworld.com.au>)
Список pgsql-patches
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

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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: create or replace rule/view
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: CREATE OR REPLACE TRIGGER