How to properly fix memory leak - Mailing list pgsql-general

From David G. Johnston
Subject How to properly fix memory leak
Date
Msg-id CAKFQuwbZxuVPZTwMmxqBYUFNajCPFKrOY12co+0pFK-eTHcEuA@mail.gmail.com
Whole thread Raw
In response to Re: How to properly fix memory leak  (Igor Korot <ikorot01@gmail.com>)
Responses Re: How to properly fix memory leak
List pgsql-general
On Friday, April 25, 2025, Igor Korot <ikorot01@gmail.com> wrote:

And the error case was handled correctly, right?

Seems like answering that requires knowing what the query is or can be.  I also have no idea what idiomatic code looks like.  Though, I’d probably use PQresultErrorMessage and check affirmatively for the tuples and error cases and have a final else should the status be something unexpected.

David J.

pgsql-general by date:

Previous
From: Igor Korot
Date:
Subject: Re: How to properly fix memory leak
Next
From: Igor Korot
Date:
Subject: Re: How to properly fix memory leak