Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Right. I made a few more adjustments, including the additional overflow
> check in printTableInit that Tom Lane suggested, and pushed this.
Committed patch LGTM.
> It's a bit annoying that the error recovery decision of this code is to
> exit the process with an error. If somebody were to be interested in a
> fun improvement exercise, it may be worth redoing the print.c API so
> that it returns errors that psql can report and recover from, instead of
> just closing the process.
> TBH though, I've never hit that code in real usage.
Yeah, I think the reason it's stayed like that for 25 years is that
nobody's hit the case in practice. Changing the API would be a bit
troublesome, too, because we don't know if anybody besides psql
uses it.
regards, tom lane