MCPcopy Create free account
hub / github.com/apache/cloudberry / dbms_sql_execute_and_fetch

Function dbms_sql_execute_and_fetch

gpcontrib/orafce/dbms_sql.c:1435–1453  ·  view source on GitHub ↗

* CREATE FUNCTION dbms_sql.execute_and_fetch(c int, exact bool DEFAULT false) RETURNS int; */

Source from the content-addressed store, hash-verified

1433 * CREATE FUNCTION dbms_sql.execute_and_fetch(c int, exact bool DEFAULT false) RETURNS int;
1434 */
1435Datum
1436dbms_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;

Callers

nothing calls this directly

Calls 5

get_cursorFunction · 0.85
fetch_rowsFunction · 0.85
executeFunction · 0.70
errcodeFunction · 0.50
errmsgFunction · 0.50

Tested by

no test coverage detected