Re: [v9.3] writable foreign tables
Andrew Dunstan <andrew@dunslane.net>
From: Andrew Dunstan <andrew@dunslane.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kohei KaiGai <kaigai@kaigai.gr.jp>, Daniel Farina <daniel@heroku.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2013-03-10T20:32:22Z
Lists: pgsql-hackers
On 03/10/2013 02:32 PM, Tom Lane wrote:
> Kohei KaiGai <kaigai@kaigai.gr.jp> writes:
>> [ pgsql-v9.3-writable-fdw-poc.v12.part-1/2.patch ]
> Applied after rather extensive editorialization. DELETE RETURNING in
> particular was a mess, and I also tried to make SELECT FOR UPDATE behave
> in what seemed like a sane fashion.
>
> There's a lot left to do here of course. One thing I was wondering
> about was why we don't allow DEFAULTs to be attached to foreign-table
> columns. There was no use in it before, but it seems sensible enough
> now.
Excellent news. But I noticed as I went to update my non-writeable FDW
that this has happened in the regression tests. Is this correct?
***
/home/pgl/npgl/fdw/file_text_array_fdw/expected/file_textarray_fdw.out
2013-03-10 16:28:00.120340629 -0400
---
/home/pgl/npgl/fdw/file_text_array_fdw/results/file_textarray_fdw.out
2013-03-10 16:28:00.595340910 -0400
***************
*** 188,196 ****
LINE 1: DELETE FROM agg_csv_array WHERE a = 100;
^
SELECT * FROM agg_csv_array FOR UPDATE OF agg_csv_array;
! ERROR: SELECT FOR UPDATE/SHARE cannot be used with foreign table
"agg_csv_array"
! LINE 1: SELECT * FROM agg_csv_array FOR UPDATE OF agg_csv_array;
! ^
-- but this should be ignored
SELECT * FROM agg_csv_array FOR UPDATE;
t
--- 188,200 ----
LINE 1: DELETE FROM agg_csv_array WHERE a = 100;
^
SELECT * FROM agg_csv_array FOR UPDATE OF agg_csv_array;
! t
! --------------
! {100,99.097}
! {0,0.09561}
! {42,324.78}
! (3 rows)
!
-- but this should be ignored
SELECT * FROM agg_csv_array FOR UPDATE;
t
cheers
andrew
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix postgres_fdw's issues with inconsistent interpretation of data values.
- cc3f281ffb0a 9.3.0 cited