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

Function FreeErrorData

src/backend/utils/error/elog.c:1879–1907  ·  view source on GitHub ↗

* FreeErrorData --- free the structure returned by CopyErrorData. * * Error handlers should use this in preference to assuming they know all * the separately-allocated fields. */

Source from the content-addressed store, hash-verified

1877 * the separately-allocated fields.
1878 */
1879void
1880FreeErrorData(ErrorData *edata)
1881{
1882 if (edata->message)
1883 pfree(edata->message);
1884 if (edata->detail)
1885 pfree(edata->detail);
1886 if (edata->detail_log)
1887 pfree(edata->detail_log);
1888 if (edata->hint)
1889 pfree(edata->hint);
1890 if (edata->context)
1891 pfree(edata->context);
1892 if (edata->backtrace)
1893 pfree(edata->backtrace);
1894 if (edata->schema_name)
1895 pfree(edata->schema_name);
1896 if (edata->table_name)
1897 pfree(edata->table_name);
1898 if (edata->column_name)
1899 pfree(edata->column_name);
1900 if (edata->datatype_name)
1901 pfree(edata->datatype_name);
1902 if (edata->constraint_name)
1903 pfree(edata->constraint_name);
1904 if (edata->internalquery)
1905 pfree(edata->internalquery);
1906 pfree(edata);
1907}
1908
1909/*
1910 * FlushErrorState --- flush the error state after error recovery

Callers 12

pltcl_elogFunction · 0.50
pltcl_subtrans_abortFunction · 0.50
pltcl_commitFunction · 0.50
pltcl_rollbackFunction · 0.50
PLy_commitFunction · 0.50
PLy_rollbackFunction · 0.50
PLy_outputFunction · 0.50
ReorderBufferProcessTXNFunction · 0.50
extaccess.cFile · 0.50

Calls 1

pfreeFunction · 0.50

Tested by

no test coverage detected