From: | Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Thom Brown <thom(at)linux(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Optimization for updating foreign tables in Postgres FDW |
Date: | 2016-01-07 12:50:31 |
Message-ID: | 568E5F17.2070206@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2016/01/06 20:37, Thom Brown wrote:
> On 25 December 2015 at 10:00, Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>> Attached is an updated version of the patch, which is
>> still WIP, but I'd be happy if I could get any feedback.
> I've run into an issue:
>
> *# UPDATE master_customers SET id = 22 WHERE id = 16 RETURNING
> tableoid::regclass;
> ERROR:
> CONTEXT: Remote SQL command: UPDATE public.customers SET id = 22
> WHERE ((id = 16)) RETURNING NULL
>
> However, this works:
>
> *# UPDATE master_customers SET id = 22 WHERE id = 16 RETURNING
> tableoid::regclass, *;
> tableoid | id | name | company | registered_date |
> expiry_date | active | status | account_level
> -----------------+----+-------+---------------+-----------------+-------------+--------+---------+---------------
> local_customers | 22 | Bruce | Jo's Cupcakes | 2015-01-15 |
> 2017-01-14 | t | running | basic
> (1 row)
>
> In this example, "local_customers" inherits from the remote table
> "public"."customers", which inherits again from the local table
> "master_customers"
>
> Same issue with DELETE of course, and the ::regclass isn't important here.
Will fix.
Thanks for the testing!
Best regards,
Etsuro Fujita
From | Date | Subject | |
---|---|---|---|
Next Message | Marisa Emerson | 2016-01-07 13:03:46 | Proposal: BSD Authentication support |
Previous Message | Etsuro Fujita | 2016-01-07 12:45:39 | Re: Optimization for updating foreign tables in Postgres FDW |