X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 413599FB2E7 for ; Tue, 1 Aug 2006 07:44:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 24813-03 for ; Tue, 1 Aug 2006 07:44:46 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by postgresql.org (Postfix) with ESMTP id 9FF679FB1D3 for ; Tue, 1 Aug 2006 07:44:46 -0300 (ADT) Received: by nf-out-0910.google.com with SMTP id p77so234405nfc for ; Tue, 01 Aug 2006 03:44:44 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=f62qZ36dkjnBM6tD8lFm4yK2WAbUblRkjEWut2bRzRtS6250gxWhbVt6CuaL5/JX6SHPOKI06TSTlWfdJIsKguZXthSp6avb9H29VBNAoSXc8ktoq9Q0WxIZn+hwogNNtV20ntxOzzQgjp2rTqiRS6HMfORAht/MmV+ITu5L1C0= Received: by 10.82.120.14 with SMTP id s14mr40621buc; Tue, 01 Aug 2006 03:44:44 -0700 (PDT) Received: by 10.82.125.11 with HTTP; Tue, 1 Aug 2006 03:44:44 -0700 (PDT) Message-ID: <928fe9b50608010344q5481f1c2sd31c29607fae52d2@mail.gmail.com> Date: Tue, 1 Aug 2006 16:14:44 +0530 From: LiveShell To: pgsql-admin@postgresql.org Subject: libpqxx + postgresql connection MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_14533_27822151.1154429084698" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.509 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, HTML_50_60, HTML_MESSAGE, NORMAL_HTTP_TO_IP, SPF_PASS X-Spam-Level: X-Archive-Number: 200608/5 X-Sequence-Number: 22549 ------=_Part_14533_27822151.1154429084698 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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???? ------=_Part_14533_27822151.1154429084698 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
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????

------=_Part_14533_27822151.1154429084698--