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

Lists: pgsql-jdbc
From: Kris Jurka <books(at)ejurka(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [Pgjdbc-commit] By davec: Added escape sequences for function
Date: 2004-08-11 06:12:53
Message-ID: Pine.BSO.4.56.0408110056300.10687@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

> 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'})} "