libpqxx + postgresql connection

Поиск
Список
Период
Сортировка
От LiveShell
Тема libpqxx + postgresql connection
Дата
Msg-id 928fe9b50608010344q5481f1c2sd31c29607fae52d2@mail.gmail.com
обсуждение исходный текст
Ответы Re: libpqxx + postgresql connection  (Andy Shellam <andy.shellam-lists@mailnetwork.co.uk>)
Список pgsql-admin
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????

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Shoaib Mir"
Дата:
Сообщение: Re: how to increase performance of Postgre
Следующее
От: Andy Shellam
Дата:
Сообщение: Re: libpqxx + postgresql connection