Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 51AC29FB0D1 for ; Sat, 30 Sep 2006 15:47:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 25093-08 for ; Sat, 30 Sep 2006 18:47:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by postgresql.org (Postfix) with SMTP id 63DFE9FA4E3 for ; Sat, 30 Sep 2006 15:47:49 -0300 (ADT) Received: (qmail invoked by alias); 30 Sep 2006 18:47:46 -0000 Received: from 85-125-151-228.dynamic.xdsl-line.inode.at (EHLO [127.0.0.1]) [85.125.151.228] by mail.gmx.net (mp020) with SMTP; 30 Sep 2006 20:47:46 +0200 X-Authenticated: #1946847 Message-ID: <451EBBCF.1030902@gmx.at> Date: Sat, 30 Sep 2006 20:47:43 +0200 From: Michael Paesold User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Dave Cramer CC: =?ISO-8859-1?Q?Gr=E9gory_Chazalon?= , Tom Lane , pgsql-jdbc@postgresql.org Subject: Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails References: <53F8133C991FEC4BA0872D19BAD9694C3B6A70@ADV-SBS.advestigo.loc> <451BAE61.6070802@gmx.at> <11DE4B3E-F76F-42C8-A5A6-2C63E14458AD@fastcrypt.com> In-Reply-To: <11DE4B3E-F76F-42C8-A5A6-2C63E14458AD@fastcrypt.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200609/160 X-Sequence-Number: 15878 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