* Convenience subroutine to issue a non-data-returning SQL command to remote */
| 566 | * Convenience subroutine to issue a non-data-returning SQL command to remote |
| 567 | */ |
| 568 | void |
| 569 | do_sql_command(PGconn *conn, const char *sql) |
| 570 | { |
| 571 | PGresult *res; |
| 572 | |
| 573 | if (!PQsendQuery(conn, sql)) |
| 574 | pgfdw_report_error(ERROR, NULL, conn, false, sql); |
| 575 | res = pgfdw_get_result(conn, sql); |
| 576 | if (PQresultStatus(res) != PGRES_COMMAND_OK) |
| 577 | pgfdw_report_error(ERROR, res, conn, true, sql); |
| 578 | PQclear(res); |
| 579 | } |
| 580 | |
| 581 | /* |
| 582 | * Start remote transaction or subtransaction, if needed. |
no test coverage detected