aboutsummaryrefslogtreecommitdiff
path: root/contrib/jsonb_plpython
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-04-21 17:12:49 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2022-04-21 17:12:49 -0400
commit914611ea738a3601717990faff0f5d71a0f14a3d (patch)
treeec442f83b60a34edf0ff7d358c1ff1b140758844 /contrib/jsonb_plpython
parent2cb1272445d2a6616991fc6ede274d9f1f62ff73 (diff)
downloadpostgresql-914611ea738a3601717990faff0f5d71a0f14a3d.tar.gz
postgresql-914611ea738a3601717990faff0f5d71a0f14a3d.zip
Fix missed cases in libpq's error handling.
Commit 618c16707 invented an "error_result" flag in PGconn, which intends to represent the state that we have an error condition and need to build a PGRES_FATAL_ERROR PGresult from the message text in conn->errorMessage, but have not yet done so. (Postponing construction of the error object simplifies dealing with out-of-memory conditions and with concatenation of messages for multiple errors.) For nearly all purposes, this "virtual" PGresult object should act the same as if it were already materialized. But a couple of places in fe-protocol3.c didn't get that memo, and were only testing conn->result as they used to, without also checking conn->error_result. In hopes of reducing the probability of similar mistakes in future, I invented a pgHavePendingResult() macro that includes both tests. Per report from Peter Eisentraut. Discussion: https://postgr.es/m/b52277b9-fa66-b027-4a37-fb8989c73ff8@enterprisedb.com
Diffstat (limited to 'contrib/jsonb_plpython')
0 files changed, 0 insertions, 0 deletions