Are libpq and libpqxx equivalent?
Are libpq and libpqxx equivalent?
Hello,
I’m planning to learn part of the SQL language properly (need it for study purpose, also), and after installing PostgreSQL 10.1, which I hope I did properly though following the installation doc, I’m planning to install pgModeler. I first tried to install pgAdmin 4, but that was “meh”, and a friend of mine told me version 4 is not obviously the best. Unfortunately, version 3 is not supported anymore, so that friend suggested me to give pgModeler a try.
After checking the installation doc (https://www.pgmodeler.com.br/support/installation), I now encounter a stupid problem. It’s said we need libpq. I have ibpqxx installed… would that be OK?
I’m planning to learn part of the SQL language properly (need it for study purpose, also), and after installing PostgreSQL 10.1, which I hope I did properly though following the installation doc, I’m planning to install pgModeler. I first tried to install pgAdmin 4, but that was “meh”, and a friend of mine told me version 4 is not obviously the best. Unfortunately, version 3 is not supported anymore, so that friend suggested me to give pgModeler a try.
After checking the installation doc (https://www.pgmodeler.com.br/support/installation), I now encounter a stupid problem. It’s said we need libpq. I have ibpqxx installed… would that be OK?
Re: Are libpq and libpqxx equivalent?
No, they are not. libpq is a C library and is included in the postgresql source tarball. So you don't need it separately. libpqxx is a C++ library.
Re: Are libpq and libpqxx equivalent?
In general, that -xx- thing in the name means it's C++, that way, the name keeps within naming conventions. Imagine it rotated ninety degrees.
Re: Are libpq and libpqxx equivalent?
Oh, I didn’t know that. Thanks for the explanation.
So, if this is supposed to be provided by PostgreSQL, is it normal that it’s not finding it?
I’ve made a quick search and found that it might be because I run a 64bit distro. Is that so? I’m not yet familiar with environment variables and all. Is there a way to make pkg-config find libpq properly?
(I got The Linux Command Line book for Christmas, so within a few months I should be able to not bother you that much anymore with all that. )
So, if this is supposed to be provided by PostgreSQL, is it normal that it’s not finding it?
Code: Select all
$ pkg-config libpq --cflags --libs
Package libpq was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpq.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libpq' found
Code: Select all
$ find / -name libpq.pc
/usr/local/pgsql/lib/pkgconfig/libpq.pc
(I got The Linux Command Line book for Christmas, so within a few months I should be able to not bother you that much anymore with all that. )
Re: Are libpq and libpqxx equivalent?
Code: Select all
/usr/local/pgsql/lib
Re: Are libpq and libpqxx equivalent?
Hi,
Actually, this is because I’ve started learning with the Practical SQL book in early access, and it’s based on PostgreSQL 10.
Here is what I did to install it after downloading the tar.bz2.
Actually, this is because I’ve started learning with the Practical SQL book in early access, and it’s based on PostgreSQL 10.
Here is what I did to install it after downloading the tar.bz2.
Code: Select all
cd dev/postgresql10/
bunzip2 postgresql-10.1.tar.bz2
tar xf postgresql-10.1.tar
cd postgresql-10.1
./configure
make
make check
sudo make install
make clean
-
- Posts: 518
- Joined: 20. Jun 2016, 20:15
Re: Are libpq and libpqxx equivalent?
Doing so you will soon have an unmanageable system.Themis wrote:Hi,
Actually, this is because I’ve started learning with the Practical SQL book in early access, and it’s based on PostgreSQL 10.
Here is what I did to install it after downloading the tar.bz2.Code: Select all
cd dev/postgresql10/ bunzip2 postgresql-10.1.tar.bz2 tar xf postgresql-10.1.tar cd postgresql-10.1 ./configure make make check sudo make install make clean
Just get the source files from https://slackbuilds.org/repository/14.2 ... ostgresql/ or http://slackware.uk/salix/x86_64/extra- ... ostgresql/, put the source tarball in the same directory, set VERSION accordingly and run the SlackBuild.
Re: Are libpq and libpqxx equivalent?
In general, it is very important to always stay within the package management system unless you know what you are doing. If you build from source like that and just do make install, you will quickly break your system, besides losing the advantages of using it as intended.
Please have a look at Chapter Three of the Salix Startup Guide, on package management, if you have not already. Or just have another look as a refresher
Please have a look at Chapter Three of the Salix Startup Guide, on package management, if you have not already. Or just have another look as a refresher
Re: Are libpq and libpqxx equivalent?
Thank you, both of you.
Yes, I had read this chapter, but apparently I need to read it again.
So is it a clean way to undo what I’ve done? The README file from the PostgreSQL 10 sources is pretty succinct. I’ve found this thread on the PostgreSQL community… but apparently, even following the PostgreSQL install instructions, I ended up having it not exactly where it should have been installed, if I understand properly.
Yes, I had read this chapter, but apparently I need to read it again.
So is it a clean way to undo what I’ve done? The README file from the PostgreSQL 10 sources is pretty succinct. I’ve found this thread on the PostgreSQL community… but apparently, even following the PostgreSQL install instructions, I ended up having it not exactly where it should have been installed, if I understand properly.