pgsql: In psql, avoid leaking a PGresult after a query is cancelled.

2024-04-08 Thread Tom Lane
In psql, avoid leaking a PGresult after a query is cancelled. After a query cancel, the tail end of ExecQueryAndProcessResults took care to clear any not-yet-read PGresults; but it forgot about the one it has already read. There would only be such a result when handling a multi-command string

pgsql: In psql, avoid leaking a PGresult after a query is cancelled.

2024-04-08 Thread Tom Lane
In psql, avoid leaking a PGresult after a query is cancelled. After a query cancel, the tail end of ExecQueryAndProcessResults took care to clear any not-yet-read PGresults; but it forgot about the one it has already read. There would only be such a result when handling a multi-command string

pgsql: In psql, avoid leaking a PGresult after a query is cancelled.

2024-04-08 Thread Tom Lane
In psql, avoid leaking a PGresult after a query is cancelled. After a query cancel, the tail end of ExecQueryAndProcessResults took care to clear any not-yet-read PGresults; but it forgot about the one it has already read. There would only be such a result when handling a multi-command string