new relkind for view

Поиск
Список
Период
Сортировка
От Mark Hollomon
Тема new relkind for view
Дата
Msg-id 20000831125603.B26005@mindspring.com
обсуждение исходный текст
Ответы Re: new relkind for view  (Bruce Momjian <pgman@candle.pha.pa.us>)
Dumping views as views?  (Philip Warner <pjw@rhyme.com.au>)
Список pgsql-hackers
NB: I will be on vacation from 1-Sep to 5-Sep

On the patches list I sent the following:
-----------------------------------------

This patch implements a different "relkind"
for views. Views are now have a "relkind" of
RELKIND_VIEW instead of RELKIND_RELATION.

Also, views no longer have actual heap storage
files.

The follow changes were made

1. CREATE VIEW sets the new relkind

2. The executor complains if a DELETE orINSERT references a view.

3. DROP RULE complains if an attempt is madeto delete a view SELECT rule.

4. CREATE RULE "_RETmytable" AS ON SELECT TO mytable DO INSTEAD ...1. checks to make sure mytable is empty.2. sets the
relkindto RELKIND_VIEW.3. deletes the heap storage files.
 

5. LOCK myview is not allowed. :)


6. the regression test type_sanity was changed toaccount for the new relkind value.

7. CREATE INDEX ON myview ... is not allowed.

8. VACUUM myview is not allowed.VACUUM automatically skips views when do the entiredatabase.

9. TRUNCATE myview is not allowed.


THINGS LEFT TO THINK ABOUT

o pg_views

o pg_dump

o pgsql (\d \dv)

o Do we really want to be able to inherit from views?

o Is 'DROP TABLE myview' OK?


-- 
Mark Hollomon
mhh@mindspring.com



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

Предыдущее
От: Vince Vielhaber
Дата:
Сообщение: bitwise AND?
Следующее
От: Lamar Owen
Дата:
Сообщение: Re: bitwise AND?