pgsql/src/test/regress/sql (type_sanity.sql)

Поиск
Список
Период
Сортировка
От Bruce Momjian - CVS
Тема pgsql/src/test/regress/sql (type_sanity.sql)
Дата
Msg-id 200009120449.e8C4nIT10531@hub.org
обсуждение исходный текст
Список pgsql-committers
  Date: Tuesday, September 12, 2000 @ 00:49:17
Author: momjian

Update of /home/projects/pgsql/cvsroot/pgsql/src/test/regress/sql
     from hub.org:/home/projects/pgsql/tmp/cvs-serv10314/pgsql/src/test/regress/sql

Modified Files:
    type_sanity.sql

-----------------------------  Log Message  -----------------------------

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 following changes were made

1. CREATE VIEW sets the new relkind

2. The executor complains if a DELETE or
        INSERT references a view.

3. DROP RULE complains if an attempt is made
        to 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 relkind to RELKIND_VIEW.
        3. deletes the heap storage files.
5. LOCK myview is not allowed. :)


6. the regression test type_sanity was changed to
        account 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 entire
        database.

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


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

Предыдущее
От: Bruce Momjian - CVS
Дата:
Сообщение: pgsql/src/backend/tcop (utility.c)
Следующее
От: Bruce Momjian - CVS
Дата:
Сообщение: pgsql/src/test/regress/expected (type_sanity.out)