Re: when does CREATE VIEW not create a view?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: when does CREATE VIEW not create a view?
Дата
Msg-id 13777.967588707@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: when does CREATE VIEW not create a view?  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
Список pgsql-hackers
"Ross J. Reedstrom" <reedstrm@rice.edu> writes:
> Only problem is in utils/adt/ruleutils.c

> There's code in there that constructs potential rule names that start with
> '_ret' as well as '_RET', in order to use an SPI query to find the rule
> associated with a view. This is the only occurance of the string '"_ret'
> in the codebase, and I can't find a way a rule might get that name, nor an
> example in either the 6.5.0 and 7.0.2 databases I've got here.  

Most likely it's dead code.  I'd say simplify.

Mark Hollomon's question about adding a relisview column to pg_class
spurs another possibility: add a column to pg_class, but instead of
just a boolean, make it be 0 if not a view and the OID of the view rule
if it is.  That'd get rid of the dependency on rule names altogether
for code that needs to find the associated rule.
        regards, tom lane


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

Предыдущее
От: "Martin A. Marques"
Дата:
Сообщение: new in list
Следующее
От: Alfred Perlstein
Дата:
Сообщение: Re: disallow LOCK on a view - the Tom Lane remix