Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running into errors when I try to connect to a PostgreSQL server on the local machine using LibreOffice Base 3.5 (this applies to LibreOffice 4 as well):

LibreOffice Base data source selection

The following syntax (localhost:5432=<database name>; database name worktime) doesn't work:

enter image description here

When I try to test the connection on the next page, I get the following error:

Error in database URL 'sdbc:postgresql:localhost:5432=localhost':
invalid connection option "localhost:5432"

What is the correct syntax for the datasource URL?

share|improve this question
I may not ask an SU question especially for that, so I ask you personnally: what do you do when you plug Libre Office into Postgresql ? what kind of help, usefulness does this association offer ? Is it only for editing the content of the database ? – Stephane Rolland Jan 28 '13 at 13:09
@StephaneRolland: LibreOffice provides a graphical interface for input and editing of data in the tables as well as a query builder, among other features that make interfacing with the database easier. – bwDraco Jan 28 '13 at 14:46
up vote 14 down vote accepted

Ever Forward will answer your question:

This is not an Internet URL, but it functions similarly. You now need to tell LibreOffice to connect to a specific database on a specific computer:

dbname=mydb host=localhost

Use the name of your database in the dbname part. I used localhost for the host part, since PostgreSQL is on the same computer, but I would need to change that in the event that I want to connect from a remote computer.

share|improve this answer
Can you give a summary of the blog post? Standalone links aren't very useful and could become useless altogether if the linked page disappears. – bwDraco Feb 18 '12 at 16:36
It works! Thanks, but once again, please give a summary of the blog post. – bwDraco Feb 18 '12 at 17:03
sorry... is my poor english! I'm spanish... – txindoki Feb 18 '12 at 18:41
I've added the relevant excerpt from the blog post. – bwDraco Feb 21 '12 at 16:25

I know this Q is closed.. but here is more data information for someone who may stumble across this topic.

Another form of datasource URL is in the format of:

dbname=postgres hostaddr= port=5433 user=db_user password=libreoffice

I needed the above, because the default port used by LibreBase is 5432, but I needed 5433.

This URL format is discussed at

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .