https://issues.apache.org/ooo/show_bug.cgi?id=120422
Priority: P3
Bug ID: 120422
CC: [email protected]
Assignee: [email protected]
Summary: standard filter generates malformed query (3.1.1,
PostgreSQL 8.4 JDBC4 9.1)
Severity: major
Issue Type: DEFECT
Classification: Application
OS: Linux
Reporter: [email protected]
Hardware: PC
Status: UNCONFIRMED
Version: AOO 3.4.0
Component: none
Product: database access
(Please forgive my lying about the OOo version - you made the field required,
then put no options in it besides 3.4.0. 3.1.1 is the most recent version in
Red Hat's repo for RHEL5. If I am reporting a bug that is definitely fixed in a
later version, my apologies.)
When viewing a table (say, schema name public, table name equipment) and using
the standard filter to require field "name" = 'foo', this error results:
The data content could not be updated
ERROR: missing FROM-clause entry for table "public.equipment"
PostgreSQL is only telling the truth here. If the error is not obvious already,
it is obvious on clicking More -> Information:
The SQL command leading to this error is:
SELECT * FROM "public"."equipment" WHERE ( "public.equipment"."name" = 'foo' )
Interestingly, the table name is quoted correctly after FROM, but in the WHERE
clause the quoting is incorrect, suggesting a table named "public.equipment"
instead of a table named "equipment" in the schema "public".
This seems to leave the standard filter altogether unusable. :(
I do not know my way around the sources. In
trunk/main/dbaccess/source/ui/dlg/queryfilter.cxx (I only guessed to look in
this file) I do see the code apparently to quote the table name correctly. It
has this comment:
// properly quote all parts of the table name, so e.g. <schema>.<table> becomes
"<schema>"."<table>"
But this may be the part of the code that correctly handles the FROM clause,
and not the part that botches the WHERE clause. I have not spent the time
following through the code to be sure.
This bug could be related to 81891. I would not be surprised if this bug was
introduced while fixing 81891.
Thank you for your attention.
--
You are receiving this mail because:
You are on the CC list for the bug.