Apache OpenOffice (AOO) Bugzilla – Issue 84506
table database access fails via jdbc to postgresql
Last modified: 2013-01-29 21:59:01 UTC
In 232, carbon version and X11 versions, it is possible to connect to a postgresql database via JDBC. In m239 with aquavlc04 that is partly possible: connecting works, and running queries does also work. However, just looking at a table fails miserably, with the error popup: The data content could not be loaded Syntax error in SQL expression ()OK ()More If you click on the more, an error window with four crosses with Error behind it appears, which all say The data conect could not be loaded. I tested it on m239 on windows, there it works flawlessly. The difference between windows and OS X is perhaps the Java version: 1.5.13 on the mac, 1.6.03 on Windows
@fs: any input on this ?
Maybe logging the traffic between OOo and the JDBC driver (http://wiki.services.openoffice.org/wiki/Logging_JDBC_Activity) helps finding out where something goes wrong, or where there are differences between Mac and Windows.
Do you see the problem also in an actuall version?
I just tested it on DEV300m45. It reappeared. It was gone during 3.0 and 3.0.1 (OOO300m15), but later updates seem to have managed to resurface this bug. This is what came up in the window, if I clicked more: SQL-status: 42P01 ERROR: missing FROM-clause entry for table "public.contacten" De SQL-opdracht die deze fout veroorzaakt is: SELECT * FROM "public"."contacten" WHERE ( "public.contacten"."achternaam" LIKE '%ensel%' ) I can send screendumps with the messages messages if you like to.
@fs: could you please have a look ?
putting into "needs confirmation" pool, which scales better than waiting for /me to find the time to look into it ...
I just found out what the culprit is: if you try the command as SELECT * FROM "public"."contacten" WHERE ( "public"."contacten"."achternaam" LIKE '%ensel%' ) instead of SELECT * FROM "public"."contacten" WHERE ( "public.contacten"."achternaam" LIKE '%ensel%' ) it works. The root of the cause is that the schema catalog is not commented separately in the WHERE clause. The workaround is: In the advanced properties of the database settings, turn off "Use schema name in SELECT statements" Then there is no schema definition added to the created in the SQL statements and the error is not thrown.