Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 426779FA4F4 for ; Tue, 3 Oct 2006 14:03:44 -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 50220-10 for ; Tue, 3 Oct 2006 17:03:39 +0000 (UTC) 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 C73929FB21B for ; Tue, 3 Oct 2006 14:03:38 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by vimes.neko.si (Postfix) with ESMTP id D4D91BCE1 for ; Tue, 3 Oct 2006 19:03:37 +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 25446-05 for ; Tue, 3 Oct 2006 19:03:33 +0200 (CEST) Received: from inna.home (sui.neko.si [193.77.34.35]) by vimes.neko.si (Postfix) with ESMTP id AA965BCE6 for ; Tue, 3 Oct 2006 19:03:33 +0200 (CEST) From: Jure Koren Organization: Hehe d.o.o. To: pgsql-jdbc@postgresql.org Subject: Re: dollar quoting Date: Tue, 3 Oct 2006 19:03:32 +0200 User-Agent: KMail/1.9.1 References: <200610031754.38595.jure@hehe.si> <200610031900.26121.jure@hehe.si> In-Reply-To: <200610031900.26121.jure@hehe.si> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart10647518.1TxrjzDCcd"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200610031903.32618.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/23 X-Sequence-Number: 15906 --nextPart10647518.1TxrjzDCcd Content-Type: multipart/mixed; boundary="Boundary-01=_kfpIFdpIbGRbpfR" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_kfpIFdpIbGRbpfR Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 03 October 2006 19:00, Jure Koren wrote: > Well, it's really not that big, so here it is. And, naturally, I attached the one that is broken. Here it is, again. =2D-=20 Jure Koren, unix developer Hehe d.o.o. --Boundary-01=_kfpIFdpIbGRbpfR 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" 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 18:01:47.000000000 +0200 +++ postgresql-jdbc-8.2dev-503.src-dq/org/postgresql/core/v3/QueryExecutorI= mpl.java 2006-10-03 18:42:03.000000000 +0200 @@ -99,6 +99,39 @@ } break; =20 + case '$': + if (inDoubleQuotes || inSingleQuotes) + break; + int pos =3D query.indexOf('$', i+1); + if (pos < 0) + break; + String tag =3D query.substring(i+1, pos); + String nexttag =3D new StringBuilder(tag).insert(0, "$").a= ppend("$").toString(); + //System.out.println("next tag =3D (" + nexttag + ")"); + //System.out.println("begin =3D\n(" + query.substring(i-10= , pos+10) + ")"); + int nextpos =3D query.indexOf(nexttag, pos+1); + if (nextpos < 0) + break; + i =3D nextpos + tag.length() + 2; + //System.out.println("end =3D\n(" + query.substring(i-10, = i+tag.length()+10) + ")"); + break; --Boundary-01=_kfpIFdpIbGRbpfR-- --nextPart10647518.1TxrjzDCcd Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBFIpfk9iFCvmuhrCIRAmlQAJ41jS5oY9rw+RGinyY2BaytRy3SdwCg3xpd 28IGkDpkEI3245VW8hf9H+g= =JAv1 -----END PGP SIGNATURE----- --nextPart10647518.1TxrjzDCcd--