From a99c42f291421572aef2b0a9360294c7d89b8bc7 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 8 Dec 2012 18:25:48 -0500 Subject: Support automatically-updatable views. This patch makes "simple" views automatically updatable, without the need to create either INSTEAD OF triggers or INSTEAD rules. "Simple" views are those classified as updatable according to SQL-92 rules. The rewriter transforms INSERT/UPDATE/DELETE commands on such views directly into an equivalent command on the underlying table, which will generally have noticeably better performance than is possible with either triggers or user-written rules. A view that has INSTEAD OF triggers or INSTEAD rules continues to operate the same as before. For the moment, security_barrier views are not considered simple. Also, we do not support WITH CHECK OPTION. These features may be added in future. Dean Rasheed, reviewed by Amit Kapila --- src/include/utils/builtins.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/include/utils') diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index 5bc3a75856d..ad82dcc2093 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -482,6 +482,8 @@ extern Datum pg_sleep(PG_FUNCTION_ARGS); extern Datum pg_get_keywords(PG_FUNCTION_ARGS); extern Datum pg_typeof(PG_FUNCTION_ARGS); extern Datum pg_collation_for(PG_FUNCTION_ARGS); +extern Datum pg_view_is_insertable(PG_FUNCTION_ARGS); +extern Datum pg_view_is_updatable(PG_FUNCTION_ARGS); /* oid.c */ extern Datum oidin(PG_FUNCTION_ARGS); -- cgit v1.2.3