tags:

views:

1212

answers:

3

My application is a commercial GIS C++ application, and I'm looking for a robust/easy to use connector for Postgresq. (Side note: I also plan to use PostGIS)

Does anyone have any recommendations based on your experience? A plus would be if you have tried out various ones.

I have looked at:

  1. Postgres's C client
  2. pqxx
  3. QSql

EDIT Also, does anyone know what's a good admin GUI tool? I see a community list here. But there are so many! I'm developing on Windows, and dont mind paying for commercial tools. Someone in another Stackoverflow post suggested Maestro.

+3  A: 

libpq++ is one provide very good connector for PostgreSQL

SQLAPI++ is a C++ library for accessing multiple SQL databases (Oracle, SQL Server, DB2, Sybase, Informix, InterBase, SQLBase, MySQL, PostgreSQL and ODBC, SQLite).

Abstract Database Connector is a C/C++ library for making connections to several databases (MySQL, mSQL, PostgreSQL, Interbase, Informix, BDE, ODBC). It runs on Linux, UNIX, BeOS, and Windows, and a dynamic driver loader for ELF OSes is under development

Navicat is Nice GUI tool for PostgrSQL

joe
do you have a favorite among all of the ones you have listed?
ShaChris23
I have used all of them in different situations
joe
+2  A: 

Take a look at SOCI. Is an open source lib under Boost Software License (one of the most non-restrictive licenses at all).

This lib is designed especially for C++ with the idea of generic programming and type safety in mind.

SOCI Site

Regards,
Ovanes

ovanes
A: 

I wrote a wrapper around libpq for our needs. I was a long time Zeoslib (http://sourceforge.net/projects/zeoslib/) but they were riped with problems last I used them, didn't support cached datasets and plain slow.

libpq is very, very fast.

I simply download the Windows version of Postgres, copy all the DLLs to a lib directory and export the calls, include the .h and link accordingly.

I realize this is very low level but I can't emphasize enough the performance increase I'm realizing as a result.

Our application is an accounting/ERP type business application with fairly large install base some with fairly significant concurrent many user base (60, 100 connections)... This has served us very well... You can reply back if you want more details on how we wrap libpq and handle cached updates.

Eric M