Re: libpqxx + postgresql connection

From: Andy Shellam <andy(dot)shellam-lists(at)mailnetwork(dot)co(dot)uk>
To: LiveShell <liveshell(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: libpqxx + postgresql connection
Date: 2006-08-01 11:23:22
Message-ID: 44CF39AA.1020900@mailnetwork.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

You might be better off asking this on the pgsql-interfaces list -
that's geared more towards programming with libpq and other interfaces.

Andy.

LiveShell wrote:
> Hi all,
> I am using libpqxx to connct to Pgsql database.
> Following is my code in a connect method of a class
>
> try
> {
> conninfo = "host=127.0.0.1 <http://127.0.0.1/> dbname =
> DatabaseName user=uname";
> conn = new connection(conninfo);
>
> }
> catch (const sql_error &roSqlQueryError)
> {
> printf("In Error \n");
> string szQueryError = roSqlQueryError.what();
> szQueryError += "Query was:: ";
> szQueryError += roSqlQueryError.query();
> throw runtime_error(szQueryError);
> }
>
> But when i use this connection in later stage it results to
> segmentation fault.
>
> I changed database name to wrong dbname (non existing database) then
> also it doesnt go to catch staatement...
>
> Can ny body tell me what is teh problem with this????
>
> !DSPAM:37,44cf30d8143291881918933!

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Brad Nicholson 2006-08-01 15:02:14 Re: Cascading replication
Previous Message LiveShell 2006-08-01 10:44:44 libpqxx + postgresql connection