Re: error handling in pqRowProcessor broken

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: error handling in pqRowProcessor broken
Date: 2022-04-21 20:18:52
Message-ID: e4bd5c16-be26-750c-e68a-701905eaf160@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 19.04.22 21:16, Tom Lane wrote:
> Peter Eisentraut<peter(dot)eisentraut(at)enterprisedb(dot)com> writes:
>> I find that this doesn't work anymore. If you set *errmsgp = "some
>> message" and return 0, then psql will just print a result set with zero
>> rows.
> Ah, I see the problem: a few places in fe-protocol3 didn't get the memo
> that conn->error_result represents a "pending" PGresult that hasn't
> been constructed yet. The attached fixes it for me --- can you try it
> on whatever test case led you to this?

Your patch fixes it for me.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2022-04-21 20:21:57 Re: Add --{no-,}bypassrls flags to createuser
Previous Message Robert Haas 2022-04-21 19:51:05 Re: Add --{no-,}bypassrls flags to createuser