In a terminal, type:
sudo apt-get install postgresql-9.3 libreoffice libreoffice-sdbc-postgresql
It is possible that the version of postgresql available in your repositories is earlier than 9.3. You can install the version you have available.
For other distributions, check this page.
On Windows/Mac
On Linux (if not already done with above command).
sudo apt-get install libreoffice libreoffice-sdbc-postgresql