Connecting to Postgresql with LibreOffice Base

A native Postgresql connector has been added to the Arch Repositories.  Read about it here.

 

You can use LibreOffice Base to take a quick look at your Postgresql databases, build queries with its query GUI, use the report builder to  build spiffy reports of your data, or use the Base interface to paste data into Postgres.

To connect you’ll need to use Base’s JDBC interface, and to use the interface you’ll need to install the Postgres JDBC driver.  You can download the driver from here, or if you’re using Arch you can find the driver in AUR as postgresql-jdbc.

Before you can use the driver you have to tell LibreOffice where to find it.  Click Tools -> Options…  In the Options menu select Java then click Class Path.  Click Add Archive and find the jar file for the driver.  If you installed from AUR the driver will be found in the /usr/share/java/postgresql-jdbc directory.  If you’re using Java 1.6 or 1.7 use version 4 of the driver, otherwise use version 3.

After you tell LibreOffice where to find the driver you’ll need to restart Base.  The JDBC connection string is formatted more or less like this:

postgresql://:/

Then tell Base to use the org.postgresql.Driver class.  The next step will ask you for a username/password to use to connect to the database, from there you’ll have access to all the tables that account has access to.

Advertisements
  1. No trackbacks yet.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

%d bloggers like this: