Dumping views as views?

Поиск
Список
Период
Сортировка
От Philip Warner
Тема Dumping views as views?
Дата
Msg-id 3.0.5.32.20000914221655.037d4290@mail.rhyme.com.au
обсуждение исходный текст
Ответ на new relkind for view  (Mark Hollomon <mhh@mindspring.com>)
Ответы Re: Dumping views as views?
Список pgsql-hackers
In a continuing effort to make pg_dump produce valid SQL where possible, I
would like to move away from the 'Create Table'/'Create Rule' method of
defining views, and actually dump the 'Create View' command.

This seems quite do-able, but before I start I thought I would ask if there
were any reasons people could think of for not doing this?

The approach will be:

- when getting table info, also call pg_get_viewdef (which returns 'not a
view' for non-view relations).

- When dumping rules, ignore all 'view rules'. 

- Dump the 'Create View' statement in oid order as per normal.

It would be really nice if there was a simple way of detecting view rules
that was analagous to relkind. Is there a reason why this has not been
done? Has it been done?

Maybe the code that checks the rule name to see if it is a view could be
put in the backend?


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


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

Предыдущее
От: Zeljko Trogrlic
Дата:
Сообщение: RE: List funnies ?
Следующее
От: The Hermit Hacker
Дата:
Сообщение: Re: [GENERAL] List funnies ?