Re: "{ OJ " group outer joins in queries from

From: Barry Lind <blind(at)xythos(dot)com>
To: pg(at)fastcrypt(dot)com
Cc: Palle Girgensohn <girgen(at)pingpong(dot)net>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: "{ OJ " group outer joins in queries from
Date: 2003-11-13 16:48:17
Message-ID: 3FB3B5D1.6040006@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Palle Girgensohn 2003-11-13 18:28:39 Re: "{ OJ " group outer joins in queries from
Previous Message Paul Thomas 2003-11-13 15:29:15 Re: "{ OJ " group outer joins in queries from