Thread: libpq++ : Disconnect a DB

libpq++ : Disconnect a DB

From
Renaud Tthonnart
Date:
Good morning everyone,

By declaring a PgDatabase variable like this, I know that I make a
connection to the DB 'test'

PgDatabase data("dbname = test");


How to end connection?
By making this?

delete data;

regards, Renaud THONNART


Re: libpq++ : Disconnect a DB

From
Renaud Tthonnart
Date:
Jose Manuel Lorenzo Lopez wrote:

> Renaud Tthonnart schrieb:
> >
> > Good morning everyone,
> >
> > By declaring a PgDatabase variable like this, I know that I make a
> > connection to the DB 'test'
> >
> > PgDatabase data("dbname = test");
> >
> > How to end connection?
> > By making this?
> >
> > delete data;
>
> Hello Renaud,
>
> I think yes, because I guess there is an implicit call to disconnect
> your object by calling the destructor. But I am not sure, may be
> any of the developers in this list is able to confirm my point of
> view.
>
> Best Regards / Un saludo / Mit freundlichen Grüßen / Cordiali Saluti
>
> José Manuel Lorenzo López
>

I am thinking just like you!
Thank you to strengthen my intuition

Renaud THONNART