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

Function close_cursor

gpcontrib/orafce/dbms_sql.c:267–284  ·  view source on GitHub ↗

* Release all sources assigned to cursor */

Source from the content-addressed store, hash-verified

265 * Release all sources assigned to cursor
266 */
267static void
268close_cursor(CursorData *c)
269{
270 if (c->executed && c->portal)
271 SPI_cursor_close(c->portal);
272
273 /* release all assigned memory */
274 if (c->cursor_cxt)
275 MemoryContextDelete(c->cursor_cxt);
276
277 if (c->cursor_xact_cxt)
278 MemoryContextDelete(c->cursor_xact_cxt);
279
280 if (c->plan)
281 SPI_freeplan(c->plan);
282
283 memset(c, 0, sizeof(CursorData));
284}
285
286/*
287 * PROCEDURE dbms_sql.close_cursor(c int)

Callers 2

dbms_sql_close_cursorFunction · 0.70
dbms_sql_parseFunction · 0.70

Calls 2

SPI_cursor_closeFunction · 0.85
SPI_freeplanFunction · 0.85

Tested by

no test coverage detected