From: Bryan White <bryan@arcamax.com>
To: pgsql-interfaces@postgreSQL.org
Subject: Can a PGresult outlive a PGconn
Date: Tue, 1 Dec 1998 11:47:25 -0500
Message-ID: <001801be1d4a$46395360$a3f0f6ce@bryan.arcamax.com> (raw)
I am doing some coding using libpq under Postgres 6.4. I want to be able to
cache the results of some queries. These are mostly selects on small tables
used to fill out combo boxes. The tables don't change very often but get
referenced a lot.
My question is: is it better to execute the query and keep the PGresult
around or extract the data from the PQresult into another structure? A key
point is that the PGconn will often be PQfinish'ed before the data is used.
Does a PGresult remain valid after the PGconn that it is associated with is
closed? Does a PGresult keep any resources allocated in the backend?
Bryan White
ArcaMax Inc.
Yorktown VA
www.arcamax.com
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: pgsql-interfaces@postgresql.org
Cc: bryan@arcamax.com
Subject: Re: Can a PGresult outlive a PGconn
In-Reply-To: <001801be1d4a$46395360$a3f0f6ce@bryan.arcamax.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox