Re: de-deduplicate code in DML execution hooks in postgres_fdw

2019-01-16 Thread Michael Paquier
On Thu, Jan 17, 2019 at 02:44:25PM +0900, Etsuro Fujita wrote: > Pushed. I left that argument alone. I think we can change it later, if > necessary :). Sure, that's fine as well. Thanks for committing the patch. -- Michael signature.asc Description: PGP signature

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2019-01-16 Thread Etsuro Fujita
(2019/01/16 20:30), Etsuro Fujita wrote: (2019/01/16 15:54), Michael Paquier wrote: On Wed, Jan 16, 2019 at 02:59:15PM +0900, Etsuro Fujita wrote: If there are no objections, I'll commit that version of the patch. I think that you could use PgFdwModifyState for the second argument of

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2019-01-16 Thread Etsuro Fujita
Michael-san, (2019/01/16 15:54), Michael Paquier wrote: On Wed, Jan 16, 2019 at 02:59:15PM +0900, Etsuro Fujita wrote: (2019/01/07 20:26), Etsuro Fujita wrote: On second thought I'd like to propose another option: execute_foreign_modify because I think this would match the existing helper

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2019-01-15 Thread Michael Paquier
On Wed, Jan 16, 2019 at 02:59:15PM +0900, Etsuro Fujita wrote: > (2019/01/07 20:26), Etsuro Fujita wrote: >> On second thought I'd like to propose another option: >> execute_foreign_modify because I think this would match the existing >> helper functions for updating foreign tables in

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2019-01-15 Thread Etsuro Fujita
(2019/01/07 20:26), Etsuro Fujita wrote: (2018/11/30 19:55), Etsuro Fujita wrote: One thing we would need to discuss more about this is the name of a new function added by the patch. IIRC, we have three options so far [1]: 1) perform_one_foreign_dml proposed by Ashutosh 2)

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2019-01-07 Thread Etsuro Fujita
(2018/11/30 19:55), Etsuro Fujita wrote: One thing we would need to discuss more about this is the name of a new function added by the patch. IIRC, we have three options so far [1]: 1) perform_one_foreign_dml proposed by Ashutosh 2) execute_dml_single_row proposed by Michael 3)

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2018-11-30 Thread Etsuro Fujita
(2018/11/30 2:58), Dmitry Dolgov wrote: On Mon, Oct 1, 2018 at 2:55 PM Etsuro Fujita wrote: (2018/10/01 19:42), Michael Paquier wrote: On Mon, Jul 23, 2018 at 02:17:38PM +0530, Ashutosh Bapat wrote: Fujita-san, you are registered as a reviewer of this patch. Are you planning to look at it

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2018-11-29 Thread Dmitry Dolgov
> On Mon, Oct 1, 2018 at 2:55 PM Etsuro Fujita > wrote: > > (2018/10/01 19:42), Michael Paquier wrote: > > On Mon, Jul 23, 2018 at 02:17:38PM +0530, Ashutosh Bapat wrote: > > Fujita-san, you are registered as a reviewer of this patch. Are you > > planning to look at it soon? > > Yeah, I'm

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2018-10-01 Thread Michael Paquier
On Tue, Oct 02, 2018 at 01:50:46PM +0900, Etsuro Fujita wrote: > Sorry, I forgot to add the pointer for [1]: > > https://www.postgresql.org/message-id/CAFjFpRfcgwsHRmpvoOK-GUQi-n8MgAS%2BOxcQo%3DaBDn1COywmcg%40mail.gmail.com OK, thanks for your update! -- Michael signature.asc Description: PGP

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2018-10-01 Thread Etsuro Fujita
(2018/10/01 21:54), Etsuro Fujita wrote: (2018/10/01 19:42), Michael Paquier wrote: On Mon, Jul 23, 2018 at 02:17:38PM +0530, Ashutosh Bapat wrote: I used perform instead of execute since the later is usually associated with local operation. I added "foreign" in the name of the function to

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2018-10-01 Thread Etsuro Fujita
(2018/10/01 19:42), Michael Paquier wrote: On Mon, Jul 23, 2018 at 02:17:38PM +0530, Ashutosh Bapat wrote: I used perform instead of execute since the later is usually associated with local operation. I added "foreign" in the name of the function to indicate that it's executed on foreign

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2018-10-01 Thread Michael Paquier
On Mon, Jul 23, 2018 at 02:17:38PM +0530, Ashutosh Bapat wrote: > I used perform instead of execute since the later is usually > associated with local operation. I added "foreign" in the name of the > function to indicate that it's executed on foreign server. I am happy > with "remote" as well. I

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2018-07-23 Thread Ashutosh Bapat
On Fri, Jul 20, 2018 at 2:27 PM, Etsuro Fujita wrote: > (2018/07/20 13:49), Michael Paquier wrote: >> >> On Thu, Jul 19, 2018 at 05:35:11PM +0900, Etsuro Fujita wrote: >>> >>> +1 for the general idea. (Actually, I also thought the same thing >>> before.) >>> But since this is definitely a matter

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2018-07-20 Thread Etsuro Fujita
(2018/07/20 13:49), Michael Paquier wrote: On Thu, Jul 19, 2018 at 05:35:11PM +0900, Etsuro Fujita wrote: +1 for the general idea. (Actually, I also thought the same thing before.) But since this is definitely a matter of PG12, ISTM that it's wise to work on this after addressing the issue in

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2018-07-19 Thread Michael Paquier
On Thu, Jul 19, 2018 at 05:35:11PM +0900, Etsuro Fujita wrote: > +1 for the general idea. (Actually, I also thought the same thing before.) > But since this is definitely a matter of PG12, ISTM that it's wise to work > on this after addressing the issue in [1]. My concern is: if we do this >

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2018-07-19 Thread Etsuro Fujita
(2018/07/19 17:52), Ashutosh Bapat wrote: On Thu, Jul 19, 2018 at 2:05 PM, Etsuro Fujita wrote: +1 for the general idea. (Actually, I also thought the same thing before.) But since this is definitely a matter of PG12, ISTM that it's wise to work on this after addressing the issue in [1]. My

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2018-07-19 Thread Ashutosh Bapat
On Thu, Jul 19, 2018 at 2:05 PM, Etsuro Fujita wrote: > (2018/04/18 19:34), Ashutosh Bapat wrote: >> >> Hi, >> While working on a fix related to non-direct DML [1], I noticed that >> postgresExecForeignInsert(), postgresExecForeignUpdate() and >> postgresExecForeignDelete() functions are almost

Re: de-deduplicate code in DML execution hooks in postgres_fdw

2018-07-19 Thread Etsuro Fujita
(2018/04/18 19:34), Ashutosh Bapat wrote: Hi, While working on a fix related to non-direct DML [1], I noticed that postgresExecForeignInsert(), postgresExecForeignUpdate() and postgresExecForeignDelete() functions are almost identical except that postgresExecForeignInsert() doesn't require ctid.

de-deduplicate code in DML execution hooks in postgres_fdw

2018-04-18 Thread Ashutosh Bapat
Hi, While working on a fix related to non-direct DML [1], I noticed that postgresExecForeignInsert(), postgresExecForeignUpdate() and postgresExecForeignDelete() functions are almost identical except that postgresExecForeignInsert() doesn't require ctid. The fix that I was working is applicable to