pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andy Shellam <andy.shellam-lists@mailnetwork.co.uk>
To: LiveShell <liveshell@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: libpqxx + postgresql connection
Date: Tue, 01 Aug 2006 12:23:22 +0100
Message-ID: <44CF39AA.1020900@mailnetwork.co.uk> (raw)
In-Reply-To: <928fe9b50608010344q5481f1c2sd31c29607fae52d2@mail.gmail.com>
References: <928fe9b50608010344q5481f1c2sd31c29607fae52d2@mail.gmail.com>

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! 

view thread (2+ messages)

Message-ID: <44CF39AA.1020900@mailnetwork.co.uk>
Permalink:  ../44CF39AA.1020900@mailnetwork.co.uk/
Also on:    postgresql.org/message-id/44CF39AA.1020900@mailnetwork.co.uk

 · 

reply

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: andy.shellam-lists@mailnetwork.co.uk, liveshell@gmail.com
  Subject: Re: libpqxx + postgresql connection
  In-Reply-To: <44CF39AA.1020900@mailnetwork.co.uk>
  References: <928fe9b50608010344q5481f1c2sd31c29607fae52d2@mail.gmail.com> <44CF39AA.1020900@mailnetwork.co.uk>

* 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