Re: "{ OJ " group outer joins in queries from - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: "{ OJ " group outer joins in queries from
Date
Msg-id 1068729691.1621.5.camel@localhost.localdomain
Whole thread Raw
In response to "{ OJ " group outer joins in queries from OpenOffice.org?  (Palle Girgensohn <girgen@pingpong.net>)
Responses Re: "{ OJ " group outer joins in queries from  (Paul Thomas <paul@tmsl.demon.co.uk>)
Re: "{ OJ " group outer joins in queries  (Palle Girgensohn <girgen@pingpong.net>)
Re: "{ OJ " group outer joins in queries from  (Barry Lind <blind@xythos.com>)
List pgsql-jdbc
Definitely not, we do not intercept the query and modify it other than
escaping some characters.

Why would they think that JDBC is similiar to ODBC?

Dave
On Wed, 2003-11-12 at 22:50, Palle Girgensohn wrote:
> Hi,
>
> This was discussed on the pgsql-sql list. Tom Lane asked if someone knows
> about this, no answer at that list, so I guess I'll ask here:
>
> OpeoOffice adds "{ OJ " .., "}" around outer joins. Apparently, as Tom
> recalls, the ODBC standard expects this, since ODBC rephrases the query to
> be compatible with different db servers. I don't think this construct
> exists in JDBC? Anyone knows?
>
> Two bug reports on OO.org with the same matter, only seem to involve
> postgresql jdbc driver?
>
> http://www.openoffice.org/issues/show_bug.cgi?id=14296
> http://www.openoffice.org/issues/show_bug.cgi?id=22355
>
> See (parts of) my original mail below:
>
> >> Palle Girgensohn <girgen@pingpong.net> writes:
> >>> Here's their code snippet (from
> >>> oo_1.1_src/dbaccess/source/ui/querydesign/QueryDesignView.cxx):
> >>
> >>> if(aJoin.getLength())
> >>> {
> >>>     ::rtl::OUString aStr = ::rtl::OUString::createFromAscii("{ OJ ");
> >>>     aStr += aJoin;
> >>>     aStr += ::rtl::OUString::createFromAscii(" },");
> >>>     aTableListStr += aStr;
> >>> }
> >>
> >> Now that I look at it, I bet that they are expecting the ODBC driver to
> >> translate "{ OJ ... }" into the appropriate syntax for the database
> >> (either SQL standard or not, depending on the DB :-().
> >>
> >> There are a number of ODBC brace-constructs that our driver knows how to
> >> translate, but I don't think that's one of them.  You should bug the
> >> ODBC guys about it.
> >>
> >>             regards, tom lane
>
> Palle Girgensohn <girgen@pingpong.net> writes:
> > Hi!
> >
> > I just tried using openoffice to create a SQL query, but it failed when I
> > tried using left outer joins. The contructed query from OO contains curly
> > braces to group things. I've never seen this construct before. Is it OO
> > doing bad things, or does postgresql not understand it? It's on pg-7.3.4.
> > Perhaps 7.4 behaves differently?
> >
> > SELECT "personer"."foretag", "personer"."fnamn", "personer"."enamn",
> > "befattningnamn"."namn" FROM  { OJ "public"."befattning" "befattning"
> >   LEFT OUTER JOIN "public"."personer" "personer" ON
> > "befattning"."personid" = "personer"."personid" },   "public"."kommentar"
> > "kommentar", "public"."personer" "personer", "public"."befattning"
> > "befattning",   "public"."befattningnamn" "befattningnamn" WHERE  0 = 1
> >
> >
> > ERROR:  parser: parse error at or near "{" at character 100
> >
> > (The WHERE 0 = 1 seems to be OO's way of checking the query syntax.)
> >
> > Thanks
> > Palle
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
>


pgsql-jdbc by date:

Previous
From: Palle Girgensohn
Date:
Subject: "{ OJ " group outer joins in queries from OpenOffice.org?
Next
From: Paul Thomas
Date:
Subject: Re: "{ OJ " group outer joins in queries from