how to connect to postgresql table from libreoffice

Created by marcobra (Marco Braida) on on 2012-12-12
postgresql libreoffice connection datasource sdbc
Last updated by:
marcobra (Marco Braida) on on 2012-12-17


- we have a postgresql server configured (it need some configuration steps) and running in our lan with ip listen on 5432 port for incoming connections.

- the server is also resolved on our lan as

- we have a defined user on db: "myuser" with password "mypassword"

- the remote database name to access to is: "postgresql_remote_db"

** First we must check/install the libreoffice-sdbc-postgresql package

sudo apt-get install libreoffice-sdbc-postgresql

We can create a datasource inside libreoffice to access to a rdbms database of the postgresql server

We can open the Libreoffice Base select new database from main menu
the we can link to an existent database select Postgresql database, into connection url you can specify some connection parameters put something like this:

dbname=postgresql_remote_db hostaddr= port=5432

or we can also set the user or user and password into connection string:

dbname=postgresql_remote_db hostaddr= port=5432 user=myuser password=mypassword

if instead of ipname we have a pc name the string will be something like this:

dbname=postgresql_remote_db host=pgsqlserver port=5432 user=myuser password=mypassword

Connections parameters details here:

Take care of security please consider: