public inbox for [email protected]  
help / color / mirror / Atom feed
From: Igor Korot <[email protected]>
To: pgsql-generallists.postgresql.org <[email protected]>
Subject: PQprepare result
Date: Mon, 29 Dec 2025 13:14:13 -0800
Message-ID: <CA+FnnTzJp+K9X6XWK=_YauQ8rodFZ4h2s__LXNFfRX6+FgyMbQ@mail.gmail.com> (raw)

Hi, ALL,

[code]
PGresult *res = PQprepare( m_db, "query1", ... );
PQclear( res );
res = PQprepare( m_db, "query2", ....);
PQclear( res );
[/code]

I presume that it is safe to do the code like this
(re-using the PGresult variable).

Or I have to use its own PGresult for each PQprepare
call?

Thank you.






view thread (2+ 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]
  Subject: Re: PQprepare result
  In-Reply-To: <CA+FnnTzJp+K9X6XWK=_YauQ8rodFZ4h2s__LXNFfRX6+FgyMbQ@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