* postgresEndDirectModify * Finish a direct foreign table modification */
| 2795 | * Finish a direct foreign table modification |
| 2796 | */ |
| 2797 | static void |
| 2798 | postgresEndDirectModify(ForeignScanState *node) |
| 2799 | { |
| 2800 | PgFdwDirectModifyState *dmstate = (PgFdwDirectModifyState *) node->fdw_state; |
| 2801 | |
| 2802 | /* if dmstate is NULL, we are in EXPLAIN; nothing to do */ |
| 2803 | if (dmstate == NULL) |
| 2804 | return; |
| 2805 | |
| 2806 | /* Release PGresult */ |
| 2807 | if (dmstate->result) |
| 2808 | PQclear(dmstate->result); |
| 2809 | |
| 2810 | /* Release remote connection */ |
| 2811 | ReleaseConnection(dmstate->conn); |
| 2812 | dmstate->conn = NULL; |
| 2813 | |
| 2814 | /* MemoryContext will be deleted automatically. */ |
| 2815 | } |
| 2816 | |
| 2817 | /* |
| 2818 | * postgresExplainForeignScan |
nothing calls this directly
no test coverage detected