summaryrefslogtreecommitdiff
path: root/contrib/file_fdw
diff options
context:
space:
mode:
authorTom Lane2013-03-10 18:14:53 +0000
committerTom Lane2013-03-10 18:16:02 +0000
commit21734d2fb896e0ecdddd3251caa72a3576e2d415 (patch)
treeaed4ee5509e618c0fd9746c8be17c5bf23a08a3f /contrib/file_fdw
parent7f49a67f954db3e92fd96963169fb8302959576e (diff)
Support writable foreign tables.
This patch adds the core-system infrastructure needed to support updates on foreign tables, and extends contrib/postgres_fdw to allow updates against remote Postgres servers. There's still a great deal of room for improvement in optimization of remote updates, but at least there's basic functionality there now. KaiGai Kohei, reviewed by Alexander Korotkov and Laurenz Albe, and rather heavily revised by Tom Lane.
Diffstat (limited to 'contrib/file_fdw')
-rw-r--r--contrib/file_fdw/input/file_fdw.source1
-rw-r--r--contrib/file_fdw/output/file_fdw.source10
2 files changed, 3 insertions, 8 deletions
diff --git a/contrib/file_fdw/input/file_fdw.source b/contrib/file_fdw/input/file_fdw.source
index 8e3d553f904..f7fd28d44d7 100644
--- a/contrib/file_fdw/input/file_fdw.source
+++ b/contrib/file_fdw/input/file_fdw.source
@@ -118,7 +118,6 @@ SELECT tableoid::regclass, b FROM agg_csv;
INSERT INTO agg_csv VALUES(1,2.0);
UPDATE agg_csv SET a = 1;
DELETE FROM agg_csv WHERE a = 100;
-SELECT * FROM agg_csv FOR UPDATE OF agg_csv;
-- but this should be ignored
SELECT * FROM agg_csv FOR UPDATE;
diff --git a/contrib/file_fdw/output/file_fdw.source b/contrib/file_fdw/output/file_fdw.source
index ece72429ba5..4f90baebd6b 100644
--- a/contrib/file_fdw/output/file_fdw.source
+++ b/contrib/file_fdw/output/file_fdw.source
@@ -185,15 +185,11 @@ SELECT tableoid::regclass, b FROM agg_csv;
-- updates aren't supported
INSERT INTO agg_csv VALUES(1,2.0);
-ERROR: cannot change foreign table "agg_csv"
+ERROR: cannot insert into foreign table "agg_csv"
UPDATE agg_csv SET a = 1;
-ERROR: cannot change foreign table "agg_csv"
+ERROR: cannot update foreign table "agg_csv"
DELETE FROM agg_csv WHERE a = 100;
-ERROR: cannot change foreign table "agg_csv"
-SELECT * FROM agg_csv FOR UPDATE OF agg_csv;
-ERROR: row-level locks cannot be used with foreign table "agg_csv"
-LINE 1: SELECT * FROM agg_csv FOR UPDATE OF agg_csv;
- ^
+ERROR: cannot delete from foreign table "agg_csv"
-- but this should be ignored
SELECT * FROM agg_csv FOR UPDATE;
a | b