Re: Optimization for updating foreign tables in Postgres FDW - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Re: Optimization for updating foreign tables in Postgres FDW
Date
Msg-id 568E5F17.2070206@lab.ntt.co.jp
Whole thread Raw
In response to Re: Optimization for updating foreign tables in Postgres FDW  (Thom Brown <thom@linux.com>)
Responses Odd behavior in foreign table modification (Was: Re: Optimization for updating foreign tables in Postgres FDW)
List pgsql-hackers
On 2016/01/06 20:37, Thom Brown wrote:
> On 25 December 2015 at 10:00, Etsuro Fujita <fujita.etsuro@lab.ntt.co.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





pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: Optimization for updating foreign tables in Postgres FDW
Next
From: Marisa Emerson
Date:
Subject: Proposal: BSD Authentication support