]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Don't use abort(3) in libpq's fe-print.c.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 28 Jun 2021 18:17:42 +0000 (14:17 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 28 Jun 2021 18:17:42 +0000 (14:17 -0400)
commit06a2b2fe55807c120b1e27bc6043244518c7de65
treebc3a83e9130fd8c6f66d174730b1d903bd4c39eb
parent5160d5bb16625e154857ad7f717ddaee118b3fd3
Don't use abort(3) in libpq's fe-print.c.

Causing a core dump on out-of-memory seems pretty unfriendly,
and surely is far outside the expected behavior of a general-purpose
library.  Just print an error message (as we did already) and return.
These functions unfortunately don't have an error return convention,
but code using them is probably just looking for a quick-n-dirty
print method and wouldn't bother to check anyway.

Although these functions are semi-deprecated, it still seems
appropriate to back-patch this.  In passing, also back-patch
b90e6cef1, just to reduce cosmetic differences between the
branches.

Discussion: https://postgr.es/m/3122443.1624735363@sss.pgh.pa.us
src/interfaces/libpq/fe-print.c