pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paesold <mpaesold@gmx.at>
To: Dave Cramer <pg@fastcrypt.com>
Cc: Grégory Chazalon <Gregory.Chazalon@advestigo.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails
Date: Sat, 30 Sep 2006 20:47:43 +0200
Message-ID: <451EBBCF.1030902@gmx.at> (raw)
In-Reply-To: <11DE4B3E-F76F-42C8-A5A6-2C63E14458AD@fastcrypt.com>
References: <53F8133C991FEC4BA0872D19BAD9694C3B6A70@ADV-SBS.advestigo.loc>
	<451BAE61.6070802@gmx.at>
	<11DE4B3E-F76F-42C8-A5A6-2C63E14458AD@fastcrypt.com>

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




view thread (20+ messages)  latest in thread

Message-ID: <451EBBCF.1030902@gmx.at>
Permalink:  ../451EBBCF.1030902@gmx.at/
Also on:    postgresql.org/message-id/451EBBCF.1030902@gmx.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: mpaesold@gmx.at, pg@fastcrypt.com, Gregory.Chazalon@advestigo.com, tgl@sss.pgh.pa.us
  Subject: Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails
  In-Reply-To: <451EBBCF.1030902@gmx.at>
  References: <53F8133C991FEC4BA0872D19BAD9694C3B6A70@ADV-SBS.advestigo.loc> <451BAE61.6070802@gmx.at> <11DE4B3E-F76F-42C8-A5A6-2C63E14458AD@fastcrypt.com> <451EBBCF.1030902@gmx.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox