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

Function PLy_cursor_close

src/pl/plpython/plpy_cursorobject.c:474–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472}
473
474static PyObject *
475PLy_cursor_close(PyObject *self, PyObject *unused)
476{
477 PLyCursorObject *cursor = (PLyCursorObject *) self;
478
479 if (!cursor->closed)
480 {
481 Portal portal = GetPortalByName(cursor->portalname);
482
483 if (!PortalIsValid(portal))
484 {
485 PLy_exception_set(PyExc_ValueError,
486 "closing a cursor in an aborted subtransaction");
487 return NULL;
488 }
489
490 UnpinPortal(portal);
491 SPI_cursor_close(portal);
492 cursor->closed = true;
493 }
494
495 Py_RETURN_NONE;
496}

Callers

nothing calls this directly

Calls 4

GetPortalByNameFunction · 0.85
PLy_exception_setFunction · 0.85
UnpinPortalFunction · 0.85
SPI_cursor_closeFunction · 0.85

Tested by

no test coverage detected