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

Function exec_command_errverbose

src/bin/psql/command.c:1299–1324  ·  view source on GitHub ↗

* \errverbose -- display verbose message from last failed query */

Source from the content-addressed store, hash-verified

1297 * \errverbose -- display verbose message from last failed query
1298 */
1299static backslashResult
1300exec_command_errverbose(PsqlScanState scan_state, bool active_branch)
1301{
1302 if (active_branch)
1303 {
1304 if (pset.last_error_result)
1305 {
1306 char *msg;
1307
1308 msg = PQresultVerboseErrorMessage(pset.last_error_result,
1309 PQERRORS_VERBOSE,
1310 PQSHOW_CONTEXT_ALWAYS);
1311 if (msg)
1312 {
1313 pg_log_error("%s", msg);
1314 PQfreemem(msg);
1315 }
1316 else
1317 puts(_("out of memory"));
1318 }
1319 else
1320 puts(_("There is no previous error."));
1321 }
1322
1323 return PSQL_CMD_SKIP_LINE;
1324}
1325
1326/*
1327 * \f -- change field separator

Callers 1

exec_commandFunction · 0.85

Calls 2

PQfreememFunction · 0.85

Tested by

no test coverage detected