Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 6B4249FB24C for ; Tue, 3 Oct 2006 16:46:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 19282-04 for ; Tue, 3 Oct 2006 16:46:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from vimes.neko.si (vimes.neko.si [213.161.22.88]) by postgresql.org (Postfix) with ESMTP id AC1EE9FB254 for ; Tue, 3 Oct 2006 16:46:43 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by vimes.neko.si (Postfix) with ESMTP id 5EDF85DE5 for ; Tue, 3 Oct 2006 21:46:42 +0200 (CEST) Received: from vimes.neko.si ([127.0.0.1]) by localhost (vimes.neko.si [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01090-04 for ; Tue, 3 Oct 2006 21:46:39 +0200 (CEST) Received: from inna.home (sui.neko.si [193.77.34.35]) by vimes.neko.si (Postfix) with ESMTP id 5F098BCE5 for ; Tue, 3 Oct 2006 21:46:39 +0200 (CEST) From: Jure Koren Organization: Hehe d.o.o. To: pgsql-jdbc@postgresql.org Subject: Re: dollar quoting Date: Tue, 3 Oct 2006 21:46:37 +0200 User-Agent: KMail/1.9.1 References: <200610031754.38595.jure@hehe.si> <9032.1159899269@sss.pgh.pa.us> <200610032138.28215.jure@hehe.si> In-Reply-To: <200610032138.28215.jure@hehe.si> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1410523.jqVZEe74OM"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200610032146.37524.jure@hehe.si> X-Virus-Scanned: amavisd-new at neko.si X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/28 X-Sequence-Number: 15911 --nextPart1410523.jqVZEe74OM Content-Type: multipart/mixed; boundary="Boundary-01=_d4rIFwjDap1xwTz" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_d4rIFwjDap1xwTz Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 03 October 2006 21:38, Jure Koren wrote: > This is the version that I think addresses most of the concerns posted. Except for the empty ($$) tag, which this, hopefully last version, does as= =20 well. Sorry, i haven't slept for a while. =2D-=20 Jure Koren, unix developer Hehe d.o.o. --Boundary-01=_d4rIFwjDap1xwTz Content-Type: text/x-diff; charset="iso-8859-15"; name="postgresql-jdbc-dollarquote.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="postgresql-jdbc-dollarquote.diff" Only in postgresql-jdbc-8.2dev-503.src-dq: build Only in postgresql-jdbc-8.2dev-503.src-dq: jars diff -ru postgresql-jdbc-8.2dev-503.src/org/postgresql/core/v3/QueryExecuto= rImpl.java postgresql-jdbc-8.2dev-503.src-dq/org/postgresql/core/v3/QueryEx= ecutorImpl.java =2D-- postgresql-jdbc-8.2dev-503.src/org/postgresql/core/v3/QueryExecutorIm= pl.java 2006-10-03 19:06:00.000000000 +0200 +++ postgresql-jdbc-8.2dev-503.src-dq/org/postgresql/core/v3/QueryExecutorI= mpl.java 2006-10-03 21:40:36.000000000 +0200 @@ -99,6 +99,21 @@ } break; =20 + case '$': + if (inDoubleQuotes || inSingleQuotes) + break; + int pos =3D query.indexOf('$', i+1); + if (pos < 0) + break; + String tag =3D query.substring(i, pos+1); + if (!tag.matches("^\\$([\\p{L}_][\\p{L}\\d_]*)?\\$$")) + break; + int nextpos =3D query.indexOf(tag, pos+1); + if (nextpos < 0) + break; + i =3D nextpos + tag.length() + 2; + break; + case '(': if (!inSingleQuotes && !inDoubleQuotes) inParen++; Only in postgresql-jdbc-8.2dev-503.src/org/postgresql/core/v3: QueryExecuto= rImpl.java.orig Only in postgresql-jdbc-8.2dev-503.src-dq/org/postgresql: Driver.java Only in postgresql-jdbc-8.2dev-503.src-dq/org/postgresql/util: PSQLExceptio= n.java --Boundary-01=_d4rIFwjDap1xwTz-- --nextPart1410523.jqVZEe74OM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBFIr4d9iFCvmuhrCIRAsO9AJ9PC+AQLSm4CVPnRWy6M6zJogpPawCgzRRJ ZYgdFnrsc1BeCqHeiBy71VE= =Ms4W -----END PGP SIGNATURE----- --nextPart1410523.jqVZEe74OM--