[Libpqxx-general] Lazy Connection

Mark Gabriel Paylaga mpaylaga at gmail.com
Thu Oct 29 01:47:12 UTC 2009


Thanks Jeroen! You're the best!

Regards,
Mark

On Wed, Oct 28, 2009 at 2:14 PM, Jeroen Vermeulen <jtv at xs4all.nl> wrote:

> Mark Gabriel Paylaga wrote:
>
>  If I use a Lazy Connection, it only connects to the DB when i do a new
>> transaction right (like do some select etc..)?
>>
>
> That's right.  Or if you're using a nontransaction, it'll connect when you
> start executing queries.
>
>
>
>  If that transaction is done, would it disconnect from the DB and then
>> reconnect again when another transaction is started?
>>
>
> No.  If that's what you want, you can use deactivate().  The idea of a lazy
> connection is that you can open lots of connections but not "pay" for the
> ones you don't use.
>
>
> Jeroen
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pgfoundry.org/pipermail/libpqxx-general/attachments/20091029/46d9c776/attachment.html>


More information about the Libpqxx-general mailing list