Re: idea: storing view source in system catalogs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: idea: storing view source in system catalogs
Дата
Msg-id 7079.1211324325@sss.pgh.pa.us
обсуждение исходный текст
Ответ на idea: storing view source in system catalogs  ("Merlin Moncure" <mmoncure@gmail.com>)
Список pgsql-hackers
"Merlin Moncure" <mmoncure@gmail.com> writes:
> I wonder if there is any merit to the idea of storing the 'create
> view' statement that created the view in an appropriate place.

No, there isn't.

As counterexamples look at pg_constraint.consrc and pg_attrdef.adsrc,
both of which were mistakes from the day they were put in, and have
been deprecated for a long time.  Source doesn't have any reasonable
way to track table/column renames, to point out one problem.

> If I do:
> create view v as select * from foo;

> The view definition as understood by the database expands the column
> list.

Indeed, exactly as is *required* by the SQL spec.
        regards, tom lane


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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: idea: storing view source in system catalogs
Следующее
От: Florian Pflug
Дата:
Сообщение: Re: idea: storing view source in system catalogs