* CREATE FUNCTION dbms_sql.execute_and_fetch(c int, exact bool DEFAULT false) RETURNS int; */
| 1433 | * CREATE FUNCTION dbms_sql.execute_and_fetch(c int, exact bool DEFAULT false) RETURNS int; |
| 1434 | */ |
| 1435 | Datum |
| 1436 | dbms_sql_execute_and_fetch(PG_FUNCTION_ARGS) |
| 1437 | { |
| 1438 | CursorData *c; |
| 1439 | bool exact; |
| 1440 | |
| 1441 | c = get_cursor(fcinfo, true); |
| 1442 | |
| 1443 | if (PG_ARGISNULL(1)) |
| 1444 | ereport(ERROR, |
| 1445 | (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), |
| 1446 | errmsg("exact option is NULL"))); |
| 1447 | |
| 1448 | exact = PG_GETARG_BOOL(1); |
| 1449 | |
| 1450 | execute(c); |
| 1451 | |
| 1452 | PG_RETURN_INT32(fetch_rows(c, exact)); |
| 1453 | } |
| 1454 | |
| 1455 | /* |
| 1456 | * CREATE FUNCTION dbms_sql.last_row_count() RETURNS int; |
nothing calls this directly
no test coverage detected