* postgresExecForeignBatchInsert * Insert multiple rows into a foreign table */
| 1986 | * Insert multiple rows into a foreign table |
| 1987 | */ |
| 1988 | static TupleTableSlot ** |
| 1989 | postgresExecForeignBatchInsert(EState *estate, |
| 1990 | ResultRelInfo *resultRelInfo, |
| 1991 | TupleTableSlot **slots, |
| 1992 | TupleTableSlot **planSlots, |
| 1993 | int *numSlots) |
| 1994 | { |
| 1995 | PgFdwModifyState *fmstate = (PgFdwModifyState *) resultRelInfo->ri_FdwState; |
| 1996 | TupleTableSlot **rslot; |
| 1997 | |
| 1998 | /* |
| 1999 | * If the fmstate has aux_fmstate set, use the aux_fmstate (see |
| 2000 | * postgresBeginForeignInsert()) |
| 2001 | */ |
| 2002 | if (fmstate->aux_fmstate) |
| 2003 | resultRelInfo->ri_FdwState = fmstate->aux_fmstate; |
| 2004 | rslot = execute_foreign_modify(estate, resultRelInfo, CMD_INSERT, |
| 2005 | slots, planSlots, numSlots); |
| 2006 | /* Revert that change */ |
| 2007 | if (fmstate->aux_fmstate) |
| 2008 | resultRelInfo->ri_FdwState = fmstate; |
| 2009 | |
| 2010 | return rslot; |
| 2011 | } |
| 2012 | |
| 2013 | /* |
| 2014 | * postgresGetForeignModifyBatchSize |
nothing calls this directly
no test coverage detected