postgres_fdw: Remove duplicate code in DML execution callback functions.
authorEtsuro Fujita <efujita@postgresql.org>
Thu, 17 Jan 2019 05:37:33 +0000 (14:37 +0900)
committerEtsuro Fujita <efujita@postgresql.org>
Thu, 17 Jan 2019 05:37:33 +0000 (14:37 +0900)
commit6c61d7c5935793e218d2335ac540a2cea7eacdce
tree8cb7a34beea8b6f98bea36755f54dc949e9ca33a
parentd723f56872a9fd1b898b7ee29ca5d26a9e538058
postgres_fdw: Remove duplicate code in DML execution callback functions.

postgresExecForeignInsert(), postgresExecForeignUpdate(), and
postgresExecForeignDelete() are coded almost identically, except that
postgresExecForeignInsert() does not need CTID.  Extract that code into
a separate function and use it in all the three function implementations.

Author: Ashutosh Bapat
Reviewed-By: Michael Paquier
Discussion: https://postgr.es/m/CAFjFpRcz8yoY7cBTYofcrCLwjaDeCcGKyTUivUbRiA57y3v-bw%40mail.gmail.com
contrib/postgres_fdw/postgres_fdw.c