aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/sql
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2013-06-12 17:52:54 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2013-06-12 17:53:33 -0400
commitdc3eb5638349e74a6628130a5101ce866455f4a3 (patch)
tree8554627085e942bd694093de36c283393dcad25c /contrib/postgres_fdw/sql
parent78ed8e03c67d7333708f5c1873ec1d239ae2d7e0 (diff)
downloadpostgresql-dc3eb5638349e74a6628130a5101ce866455f4a3.tar.gz
postgresql-dc3eb5638349e74a6628130a5101ce866455f4a3.zip
Improve updatability checking for views and foreign tables.
Extend the FDW API (which we already changed for 9.3) so that an FDW can report whether specific foreign tables are insertable/updatable/deletable. The default assumption continues to be that they're updatable if the relevant executor callback function is supplied by the FDW, but finer granularity is now possible. As a test case, add an "updatable" option to contrib/postgres_fdw. This patch also fixes the information_schema views, which previously did not think that foreign tables were ever updatable, and fixes view_is_auto_updatable() so that a view on a foreign table can be auto-updatable. initdb forced due to changes in information_schema views and the functions they rely on. This is a bit unfortunate to do post-beta1, but if we don't change this now then we'll have another API break for FDWs when we do change it. Dean Rasheed, somewhat editorialized on by Tom Lane
Diffstat (limited to 'contrib/postgres_fdw/sql')
-rw-r--r--contrib/postgres_fdw/sql/postgres_fdw.sql1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql
index 19221680bf1..ce8bb7597ba 100644
--- a/contrib/postgres_fdw/sql/postgres_fdw.sql
+++ b/contrib/postgres_fdw/sql/postgres_fdw.sql
@@ -88,6 +88,7 @@ ALTER FOREIGN TABLE ft2 DROP COLUMN cx;
-- configure options
ALTER SERVER testserver1 OPTIONS (
use_remote_estimate 'false',
+ updatable 'true',
fdw_startup_cost '123.456',
fdw_tuple_cost '0.123',
service 'value',