Issue 84506 - table database access fails via jdbc to postgresql
Summary: table database access fails via jdbc to postgresql
Status: UNCONFIRMED
Alias: None
Product: porting
Classification: Code
Component: MacOSX (show other issues)
Version: 680m239
Hardware: Mac Mac OS X, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2007-12-12 22:29 UTC by johanhenselmans2
Modified: 2013-01-29 21:59 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description johanhenselmans2 2007-12-12 22:29:08 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
Comment 1 philipp.lohmann 2008-10-08 16:28:26 UTC
@fs: any input on this ?
Comment 2 Frank Schönheit 2008-10-10 10:09:02 UTC
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.
Comment 3 Mechtilde 2009-03-29 20:13:00 UTC
Do you see the problem also in an actuall version?
Comment 4 johanhenselmans2 2009-03-30 10:06:22 UTC
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. 


Comment 5 philipp.lohmann 2009-05-07 06:50:44 UTC
@fs: could you please have a look ?
Comment 6 Frank Schönheit 2009-05-07 07:13:46 UTC
putting into "needs confirmation" pool, which scales better than waiting for /me
to find the time to look into it ...
Comment 7 johanhenselmans2 2009-05-11 10:01:52 UTC
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.