postgresql/src/include/catalog
Bruce Momjian 264c068207 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
2000-09-12 04:49:17 +00:00
..
catalog.h Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
catname.h Add: 2000-01-26 05:58:53 +00:00
catversion.h This patch implements a different "relkind" 2000-09-12 04:49:17 +00:00
duplicate_oids heap_fetch requires buffer pointer, must be released; heap_getnext 1998-08-19 02:04:17 +00:00
heap.h Make toast-table creation and deletion work somewhat reliably. 2000-07-04 06:11:54 +00:00
index.h Cleanup of code for creating index entries. Functional indexes with 2000-07-14 22:18:02 +00:00
indexing.h Clean out another pocket of functions called via nonspecific function 2000-06-17 04:56:39 +00:00
pg_aggregate.h Revise aggregate functions per earlier discussions in pghackers. 2000-07-17 03:05:41 +00:00
pg_am.h Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
pg_amop.h First pass at integrating BIT and BIT VARYING code from Adriaan Joubert. 2000-08-21 04:48:57 +00:00
pg_amproc.h First pass at integrating BIT and BIT VARYING code from Adriaan Joubert. 2000-08-21 04:48:57 +00:00
pg_attrdef.h Add: 2000-01-26 05:58:53 +00:00
pg_attribute.h Toast all the system-table columns that seem to need it. It turns out 2000-08-06 04:40:08 +00:00
pg_class.h This patch implements a different "relkind" 2000-09-12 04:49:17 +00:00
pg_database.h Add: 2000-01-26 05:58:53 +00:00
pg_description.h Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
pg_group.h Add: 2000-01-26 05:58:53 +00:00
pg_index.h Add: 2000-01-26 05:58:53 +00:00
pg_inheritproc.h Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
pg_inherits.h Add: 2000-01-26 05:58:53 +00:00
pg_ipl.h Add: 2000-01-26 05:58:53 +00:00
pg_language.h First round of changes for new fmgr interface. fmgr itself and the 2000-05-28 17:56:29 +00:00
pg_listener.h Add: 2000-01-26 05:58:53 +00:00
pg_log.h Add: 2000-01-26 05:58:53 +00:00
pg_opclass.h First pass at integrating BIT and BIT VARYING code from Adriaan Joubert. 2000-08-21 04:48:57 +00:00
pg_operator.h First pass at integrating BIT and BIT VARYING code from Adriaan Joubert. 2000-08-21 04:48:57 +00:00
pg_proc.h Added functions 2000-09-05 20:25:14 +00:00
pg_relcheck.h Add: 2000-01-26 05:58:53 +00:00
pg_rewrite.h Type lztext is toast. 2000-07-30 22:14:09 +00:00
pg_shadow.h Back out pg_shadow changes to allow create table and locking permissions. 2000-06-12 03:41:03 +00:00
pg_statistic.h Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
pg_trigger.h Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
pg_type.h First pass at integrating BIT and BIT VARYING code from Adriaan Joubert. 2000-08-21 04:48:57 +00:00
pg_variable.h Add: 2000-01-26 05:58:53 +00:00
pg_version.h Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
unused_oids Update unused_oids script so it works with non-GNU awk --- /* ... */ 2000-01-17 00:53:11 +00:00