Michael Paesold wrote:
> Dave Cramer wrote:
> >> I guess it's just a matter of coding, right? Would the JDBC
> >> maintainers accept a patch for the 8.2 release of the driver?
> > Absolutely!
> Ok, I am going to write support for this... [snip]
Here is a first version of the patch. It works well for me so far, so I
am asking for comments now.
This patch only adds knowledge about dollar-quotes to
v3.QueryExecutorImpl.parseQuery() for now, but there are other possible
- V2Query: for people connecting to postgres >= 8.0 using
- AbstractJdbc2Statement.modifyJdbcCall() for prepareCall: I would not
expect someone to use dollar-quoting here, but single-quotes are
supported, so adding dollar-quoting does not seem completely off
I have tried to make the patch rather non-invasive. I thought about
improving parseQuery to be more efficient, but without having done any
profiling, I did not want to considerably change the existing code
paths. All JUnit tests still pass running against an 8.1 server.
- Remove an unused variable from parseQuery
- Add static methods isDollarQuoteStartChar(char) and
- Add support for dollar-quoting in parseQuery
- New file with JUnit tests for new code
- Add the new JUnit TestCase to the test suite if server >= 8.0 and
protocolVersion == 3
In response to
pgsql-jdbc by date
|Next:||From: Dave Cramer||Date: 2006-10-01 14:15:03|
|Subject: Re: Query ResultSet parsing speedup patch (resend)|
|Previous:||From: Holger Schulz||Date: 2006-10-01 10:57:17|
|Subject: Bug extracting bit value|