[Libreoffice] PostgreSQL-SDBC in LO: build system help

Lionel Elie Mamane lionel at mamane.lu
Wed Nov 30 02:26:35 PST 2011


On Mon, Nov 28, 2011 at 02:23:21PM +0100, Alex Thurgood wrote:
> Le 28/11/2011 11:47, Alexander Thurgood a écrit :

>> However, I have no idea how you would enter the strings for a remote db
>> instance, in particular, the parameter separators. Trawling around the
>> net and in the postgres documentation didn't get me any further, because
>> any of the strings I tried failed miserably with either a failed host
>> lookup, or else a message saying that I needed to add ='' after my colon
>> separators.

> OK, I seem to have figured it out from re-reading libpq
> documentation.

If you have any remaining question, contact me.

As I'm not always keeping up with mailing lists, so feel free to CC
me.

Note that one can also give the connection information in environment
variables and in configuration files. See
http://developer.postgresql.org/pgdocs/postgres/libpq-envars.html
http://developer.postgresql.org/pgdocs/postgres/libpq-pgpass.html
http://developer.postgresql.org/pgdocs/postgres/libpq-pgservice.html

One can even add a level of indirection and get connection information
from LDAP
http://developer.postgresql.org/pgdocs/postgres/libpq-ldap.html

This all is probably beyond the scope of an introductory
documentation.

> host=10.0.0.1 dbname=mydb

Yes; "hostaddr" can be used instead/additionally to "host" when giving
a numeric IP, but that's most probably beyond the scope of an
introductory document.

> (I imagine that one could enter the usr/pwd combo in the URL field
> too,

Yes, as in "user=FOO password=BAR", but LO will ask for a username
anyway and it will override the one from the URL (or any of the other
ways: files, LDAP, ...). The "LO prompt overrides URL" could easily be
inverted, but I thought this would be the most natural. As to the
other methods, not possible to invert priority.

Ditto for the password, except that one can instruct LO not to ask for
a password by unchecking the "password required" checkbox; I haven't
tested it, but I imagine it works.

-- 
Lionel


More information about the LibreOffice mailing list