Re: [HACKERS] create rule changes table to view ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] create rule changes table to view ?
Дата
Msg-id 20212.931791644@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] create rule changes table to view ?  (Ryan Bradetich <rbrad@hpb50023.boi.hp.com>)
Ответы Re: [HACKERS] create rule changes table to view ?  (wieck@debis.com (Jan Wieck))
Re: [HACKERS] create rule changes table to view ?  (Peter Eisentraut <peter@pathwaynet.com>)
Список pgsql-hackers
Ryan Bradetich <rbrad@hpb50023.boi.hp.com> writes:
> psql declares the the type to be view? if the relkind is a relation
> and the relhasrules = true in pg_class for that entry.  I will pull
> the latest source and see if I can come up with a better way for
> determining the type tomorrow, if someone else doesn't beat me to it

The way Jan explained it to me, a view *is* a table that happens to
have an "on select do instead" rule attached to it.  If the table
has data in it (which it normally wouldn't) you can't see that data
anyway because of the select rule.

This is another example like SERIAL columns, UNIQUE columns, etc, where
we are not really leaving enough information in the system tables to
allow accurate reconstruction of what the user originally said.  Was
it a CREATE VIEW, or a CREATE TABLE and manual attachment of a rule?
No way to tell.  In one sense it doesn't matter a whole lot, but for
psql displays and pg_dump it would be nice to know what happened.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] 6.5.1 release date
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] 6.5.1 release date