* \errverbose -- display verbose message from last failed query */
| 1297 | * \errverbose -- display verbose message from last failed query |
| 1298 | */ |
| 1299 | static backslashResult |
| 1300 | exec_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 |
no test coverage detected