Re: error handling in pqRowProcessor broken

2022-04-21 Thread Tom Lane
Peter Eisentraut writes: > On 19.04.22 21:16, Tom Lane wrote: >> 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

Re: error handling in pqRowProcessor broken

2022-04-21 Thread Peter Eisentraut
On 19.04.22 21:16, Tom Lane wrote: Peter Eisentraut 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

Re: error handling in pqRowProcessor broken

2022-04-19 Thread Tom Lane
Peter Eisentraut 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"

Re: error handling in pqRowProcessor broken

2022-04-19 Thread Tom Lane
Peter Eisentraut writes: > The error handling for pqRowProcessor is described as > *Add the received row to the current async result (conn->result). > *Returns 1 if OK, 0 if error occurred. > * > * On error, *errmsgp can be set to an error string to be returned. > * If it is

error handling in pqRowProcessor broken

2022-04-19 Thread Peter Eisentraut
The error handling for pqRowProcessor is described as *Add the received row to the current async result (conn->result). *Returns 1 if OK, 0 if error occurred. * * On error, *errmsgp can be set to an error string to be returned. * If it is left NULL, the error is presumed to be "out