Pgmodeler is a handy tool for designing databases with an ERD style interface specifically aimed at the PostgreSQL community. It can come in a couple of different ways, but I am going to covering the self build process here. So if you want to learn how to build and install pgmodeler read on!

To be able to build anything you’ll need to install the tools from Ubuntu’s repositories.

The first dependency you will need to install is the from QT5 UI toolkit.

Next up you’ll need to install libpq:

To ensure that QT is installed correctly verify that you get similar responses to me from the following commands:

If you do not the there is a little manual intervention that you’ll need to perform by creating the /usr/lib/pkgconfig/libpq.pc manually. It should contain code of the following block.

So that is all the dependencies taken care of and we can move onto building and installing the actual binary itself.

The binary is now in the build directory so we can call it from there after passing it a few options with a start-up script.

Move into the build directory and create start-pgmodeler.sh.

In the start-up file we want to add the following lines of bash script.

After writing that file and quitting vim you need to set the files executable bit using chmod.

You can now run pgmodeler by calling the start-pgmodeler.sh shell script on the command line.

After the application starts itself you will be greeted by the nice QT interface of pgmodeler. You’re done!