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

Поиск
Список
Период
Сортировка
От Michael Paesold
Тема Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails
Дата
Msg-id 451EBBCF.1030902@gmx.at
обсуждение исходный текст
Ответ на Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails  (Dave Cramer <pg@fastcrypt.com>)
Ответы Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails
Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails
Список 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


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Sriram Dandapani"
Дата:
Сообщение: Re: [ADMIN] number of transactions doubling
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails