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

Function SPI_datumTransfer

src/backend/executor/spi.c:1388–1404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1386}
1387
1388Datum
1389SPI_datumTransfer(Datum value, bool typByVal, int typLen)
1390{
1391 MemoryContext oldcxt;
1392 Datum result;
1393
1394 if (_SPI_current == NULL)
1395 elog(ERROR, "SPI_datumTransfer called while not connected to SPI");
1396
1397 oldcxt = MemoryContextSwitchTo(_SPI_current->savedcxt);
1398
1399 result = datumTransfer(value, typByVal, typLen);
1400
1401 MemoryContextSwitchTo(oldcxt);
1402
1403 return result;
1404}
1405
1406void
1407SPI_freetuple(HeapTuple tuple)

Callers 3

plpgsql_exec_functionFunction · 0.85
column_valueFunction · 0.85

Calls 2

MemoryContextSwitchToFunction · 0.85
datumTransferFunction · 0.85

Tested by

no test coverage detected