PostgreSQL – C/C++ Interface

Amarjeet wants to use PostgreSQL database for his project SIM. PostgreSQL is an Object Relational Database Management System with an emphasis on extensibility and standards-compliance. libpqxx library is used for its connection to C++. It is the official C++ client API for PostgreSQL database. It is available under BSD licence, so free to use. One can download the latest version from here and then follow the given steps:

tar xvfz libpqxx-4.0.tar.gz
cd libpqxx-4.0
make install

Now, find pg_hba.conf file in your PostgreSQL installation directory and add the following line:

# IPv4 local connections:
host    all         all          md5

We can start/restart postgres server in case it is not running using the following command:

[root@host]# service postgresql restart
Stopping postgresql service:                [  OK  ]
Starting postgresql service:                [  OK  ]

Published by


I am the one who discover myself daily through reading, writing, interacting with people and expressing my thoughts to inspire them if I would be able to bring a little change to the society through my work. I write blogs, participate in various social activities and want to be a Professional Speaker. Currently, I am pursuing my post graduation in Computer Applications from Guru Nanak Dev Engineering College, Ludhiana and I’m very much active in many technical & social communities.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s