Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails

From: Michael Paesold <mpaesold(at)gmx(dot)at>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: Grégory Chazalon <Gregory(dot)Chazalon(at)advestigo(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails
Date: 2006-09-30 18:47:43
Message-ID: 451EBBCF.1030902@gmx.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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, but I need some help with
determining if a character is valid for a dollar-quote tag. I am
currently looking at the original patch implementing dollar-quoting in
the backend parser, see here:
http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/scan.l.diff?r1=1.114;r2=1.115

scan.l defines:
dolq_start [A-Za-z\200-\377_]
dolq_cont [A-Za-z\200-\377_0-9]

Some questions here:
- What are the \200-\377 characters?

- Any ideas how to efficiently check this in Java?
There is Character.isLetter() etc., but this includes all Unicode
letters, not only letters valid as identifiers in the backend.

Otherwise I can still use something like
public static boolean isDollarQuoteStartChar(char c) {
return (c >= 'A' && c <= 'Z') || ...
}

I am currently working on dollar-quote support in
v3.QueryExecutorImpl.parseQuery(..), but I also want to add it to
V2Query. Where should I put such a static method like
isDollarQuoteStartChar? org.postgresql.core.Utils?

Best Regards
Michael Paesold

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2006-09-30 18:55:57 Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails
Previous Message Mikko Tiihonen 2006-09-29 22:01:13 Query ResultSet parsing speedup patch (resend)