public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Igor Korot <[email protected]>
Cc: pgsql-generallists.postgresql.org <[email protected]>
Subject: How to properly fix memory leak
Date: Fri, 25 Apr 2025 21:55:14 -0700
Message-ID: <CAKFQuwbZxuVPZTwMmxqBYUFNajCPFKrOY12co+0pFK-eTHcEuA@mail.gmail.com> (raw)
In-Reply-To: <CA+FnnTwW6bsN3zJSHYbc7cGUi_4+PBOmHx+L5bbupwKkUio9tQ@mail.gmail.com>
References: <CA+FnnTyR9AoJx-3zuvgudeYmUTiNcfpAucUh0ZTcs=Ajy49qVA@mail.gmail.com>
	<CAKFQuwZKp_FWZ0mi9H8th+fh70KeoV=4_6uB40TvQ9r1Q04UhA@mail.gmail.com>
	<CA+FnnTwW6bsN3zJSHYbc7cGUi_4+PBOmHx+L5bbupwKkUio9tQ@mail.gmail.com>

On Friday, April 25, 2025, Igor Korot <[email protected]> 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.


view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: How to properly fix memory leak
  In-Reply-To: <CAKFQuwbZxuVPZTwMmxqBYUFNajCPFKrOY12co+0pFK-eTHcEuA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox