Re: Making psql error out on output failures

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: David Zhang <david.zhang@highgo.ca>
Cc: Daniel Verite <daniel@manitou-mail.org>, pgsql-hackers@lists.postgresql.org
Date: 2020-02-28T16:03:59Z
Lists: pgsql-hackers
On 2020-Feb-18, David Zhang wrote:

> 3. I think a better way to resolve this issue will still be the solution
> with an extra %m, which can make the error message much more informative to
> the end users.

Yes, agreed.  However, we use a style like this:

		pg_log_error("could not print tuples: %m");

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Commits

  1. psql: Catch and report errors while printing result table

  2. Fix base backup with database OIDs larger than INT32_MAX