| От | Bryan White |
|---|---|
| Тема | Can a PGresult outlive a PGconn |
| Дата | |
| Msg-id | 001801be1d4a$46395360$a3f0f6ce@bryan.arcamax.com обсуждение |
| Ответы |
Re: [INTERFACES] Can a PGresult outlive a PGconn
|
| Список | pgsql-interfaces |
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
В списке pgsql-interfaces по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера