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

From Barry Lind
Subject Re: "{ OJ " group outer joins in queries from
Date
Msg-id 3FB3B5D1.6040006@xythos.com
Whole thread Raw
In response to Re: "{ OJ " group outer joins in queries from  (Dave Cramer <pg@fastcrypt.com>)
Responses Re: "{ OJ " group outer joins in queries from
Re: "{ OJ " group outer joins in queries from
List pgsql-jdbc

Dave Cramer wrote:
> Definitely not, we do not intercept the query and modify it other than
> escaping some characters.

Not entirely true.  The driver does support the ODBC escape syntax for
dates and stored procedures/functions but not for outer joins, likes and
scalar functions.

>
> Why would they think that JDBC is similiar to ODBC?
>

Perhaps because the JDBC spec says so:

11.1 SQL Escape Syntax
JDBC supports the same DBMS-independent escape syntax as ODBC for stored
procedures, scalar functions, dates, times, and outer joins. A driver
maps this escape syntax into DBMSspecific syntax, allowing portability
of application programs that require these features. The
DBMS-independent syntax is based on an escape clause demarcated by curly
braces and a keyword:
    {keyword ... parameters ...}
This ODBC-compatible escape syntax is in general not the same as has
been adopted by ANSI in SQL-2 Transitional Level for the same
functionality. In cases where all of the desired DBMSs support the
standard SQL-2 syntax, the user is encouraged to use that syntax instead
of these escapes. When enough DBMSs support the more advanced SQL-2
syntax and semantics these escapes should no longer be necessary.



The logic that is currently supported by the driver (i.e. the date
stuff) is implemented in AbstractJdbc1Statement.replaceProcessing().
This would be where handling the outer join syntax should be added, if
anyone so desired.

thanks,
--Barry



pgsql-jdbc by date:

Previous
From: Palle Girgensohn
Date:
Subject: Re: "{ OJ " group outer joins in queries
Next
From: Palle Girgensohn
Date:
Subject: Re: "{ OJ " group outer joins in queries from