Thread: Re: [Pgjdbc-commit] By davec: Added escape sequences for function

Re: [Pgjdbc-commit] By davec: Added escape sequences for function

From
Kris Jurka
Date:

> Log Message:
> -----------
> Added escape sequences for function {fn...}
> and outer join {oj .... }
> plus tests for the same
>

The point of the function syntax is to allow users to use the functions
specified in DatabaseMetaData.getXXXFunctions().  Currently no functions
are listed there.  For starters we could list the functions that require
no mapping between the JDBC standard names and the pg server
implementations, for example things like cos, substring, and now.  From
there some simple conversions should get us most of the way to compliance
like LCASE -> LOWER.

Also I noticed that you did not implement {escape 'x'} any reason for
that?

Finally, the current parser can't handle nested escapes like
"SELECT {fn DAYNAME({d '2004-08-10'})}"

or

"SELECT * FROM a {oj LEFT JOIN b ON (a.id = b.id AND b.ondate = {d
'2004-08-10'})} "