Hi

In revision 1805579 I committed a large patch to AOO, that implements a
whole new database connector, for the PostgreSQL database.

It's the real deal, a new UNO component, 57 files, 9607 lines of code,
about 4 months in the pipeline. It's 100% in Java, and while developing it
I've also written a lot of SDBCX helper classes, loosely based on the C++
ones we already have, which will make writing future Java-based database
drivers much easier :).

Ok so it's still in its early alpha stages, maybe 50% finished, and will
need considerable further development, so definitely not recommended for
production use yet, but it already supports some things that are broken in
LibreOffice's PostgreSQL driver ;).

I would have preferred to wait until it was more complete before
committing, but I thought now is a good time, as there is talk of project
inactivity, help from others would be welcome, and "release early, release
often" is the open-source way.

It's already integrated into the build, but if you want to contribute to
development, it could not be easier: the Ant project opens in Eclipse (open
main/connectivity/java/sdbc_postgresql/build.xml using "Java Project from
Existing Ant Buildfile"), it builds in 2 seconds, and can be easily
debugged (in AOO, Tools -> Options, Java, Parameters, add:
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000"
and attach the remote debugger from Eclipse).

To use it, you need the PostgreSQL JDBC JAR file in your classpath (we
should probably ship it to users instead of requiring them to download and
configure it in their AOO Tools -> Options, Java, Class Path). In the
database wizard, choose "Connect to an existing database" and select
"PostgreSQL". At present you have to enter database URLs in the broken form
of "://127.0.0.1/catalog". Database queries work well with a variety of
data types, but some DDL features are missing/broken, eg. you can't rename
tables, indexes can't be deleted, views/users/groups need implementing,
"Refresh tables" gives you a blank screen. The code also needs to be
audited and cleaned up a lot (locking, UNO lifecycle, null strings (which
are banned in UNO)), and the relevant GUI dialogs and wizards need adding
(under main/dbaccess).

Note that you need Java >= 7.

Anyway, development continues. We have a few more database drivers that
need to be developed, such as the Thunderbird address book driver and the
LDAP driver which we lost when Mozilla was removed from the build.

Regards
Damjan

Reply via email to