From: LiveShell <liveshell@gmail.com>
To: pgsql-admin@postgresql.org
Subject: libpqxx + postgresql connection
Date: Tue, 1 Aug 2006 16:14:44 +0530
Message-ID: <928fe9b50608010344q5481f1c2sd31c29607fae52d2@mail.gmail.com> (raw)
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 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????
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: liveshell@gmail.com
Subject: Re: libpqxx + postgresql connection
In-Reply-To: <928fe9b50608010344q5481f1c2sd31c29607fae52d2@mail.gmail.com>
References: <928fe9b50608010344q5481f1c2sd31c29607fae52d2@mail.gmail.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