Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good C/C++ connector library for PostgreSQL [closed]

Tags:

c++

postgresql

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.

like image 243
sivabudh Avatar asked Jul 16 '09 15:07

sivabudh


People also ask

Which library will be used to connect PostgreSQL?

libpq is the C application programmer's interface to PostgreSQL. libpq is a set of library functions that allow client programs to pass queries to the PostgreSQL backend server and to receive the results of these queries.

How do I close open PostgreSQL connections?

In PostgreSQL there are two functions we need to take into consideration when talking about cancellation or termination: pg_cancel_backend(pid) : Terminate a query but keep the connection alive. pg_terminate_backend(pid) : Terminate a query and kill the connection.

Does C# work with PostgreSQL?

Npgsql is an open source ADO.NET Data Provider for PostgreSQL, it allows programs written in C#, Visual Basic, F# to access the PostgreSQL database server. It is implemented in 100% C# code, is free and is open source.


2 Answers

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

like image 61
joe Avatar answered Oct 14 '22 05:10

joe


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

like image 21
ovanes Avatar answered Oct 14 '22 03:10

ovanes