Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 39AC99FB645 for ; Tue, 10 Jul 2007 07:15:00 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 29203-02 for ; Tue, 10 Jul 2007 07:14:57 -0300 (ADT) X-Greylist: delayed 00:06:40.996295 by SQLgrey-1.7.5 Received: from web39109.mail.mud.yahoo.com (web39109.mail.mud.yahoo.com [209.191.87.228]) by postgresql.org (Postfix) with SMTP id B5F879FB1F8 for ; Tue, 10 Jul 2007 07:14:52 -0300 (ADT) Received: (qmail 86114 invoked by uid 60001); 10 Jul 2007 10:08:10 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=h0oTjKiO8iYkE0PUlOnPP99/b7cn7G8PbQN1gyGm/CnxH0+QY0cAVfX+kDOG8TxgX7CvOnFTja4ik1Ytqa7REoXxGSv50t84NrTVJBplWmqdWMrgRzyQSCONj2WCP5QN+8JW7eJzK2mGnG6FEqHLR2IhPCH0UsXoWErTR+M7oiM=; X-YMail-OSG: qGcKV_0VM1k3O3Ey3jiahDMgWuFRwEQ9gIYb372Lju5RAuyWz1iep7uDhB4aR0JXe26VHO1x85n.MdW_uOpkJUcxoCcG3QuGZzTCs5qOzwExeHb1RAnMgR0O4g-- Received: from [203.215.160.146] by web39109.mail.mud.yahoo.com via HTTP; Tue, 10 Jul 2007 03:08:10 PDT Date: Tue, 10 Jul 2007 03:08:10 -0700 (PDT) From: Altaf Malik Subject: Re: Unable to prepare a statement when the object names contain more than one $ symbol To: Tom Lane , Kris Jurka Cc: Altaf Malik , pgsql-jdbc@postgresql.org, mpaesold@gmx.at In-Reply-To: <23286.1183999558@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1212111318-1184062090=:85878" Content-Transfer-Encoding: 8bit Message-ID: <322907.85878.qm@web39109.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.066 tagged_above=0 required=5 tests=AWL=-0.924, BAYES_20=-0.74, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708, DNS_FROM_RFC_WHOIS=1.447, HTML_30_40=0.374, HTML_MESSAGE=0.001 X-Spam-Level: ** X-Archive-Number: 200707/37 X-Sequence-Number: 17211 --0-1212111318-1184062090=:85878 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit I think $$ should start a quote instead of $x$. Or $ character have special meaning but if there is one dollar does not happen anything wrong. Are $$ and $x$ equal? If yes, what happens with the character(s) between the two dollar signs? --Altaf Tom Lane wrote: Kris Jurka writes: > On Mon, 9 Jul 2007, Altaf Malik wrote: >> PreparedStatement pstmt = con.prepareStatement("insert into a$b$c >> values( ? , ?)"); > This is a bug in dollar quote parsing. It assumes that any potential > dollar quote start will have an end tag. If it thinks that's a dollar quote start, it's wrong already... that's a perfectly valid table name. (Although personally I'd suggest that the OP avoid dollar signs in identifiers, since they're none too portable.) regards, tom lane --------------------------------- Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. --0-1212111318-1184062090=:85878 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit I think $$ should start a quote instead of $x$. Or $ character have special meaning but if there is one dollar does not happen anything wrong. Are $$ and $x$ equal? If yes, what happens with the character(s) between the two dollar signs?

--Altaf


Tom Lane <tgl@sss.pgh.pa.us> wrote:
Kris Jurka writes:
> On Mon, 9 Jul 2007, Altaf Malik wrote:
>> PreparedStatement pstmt = con.prepareStatement("insert into a$b$c
>> values( ? , ?)");

> This is a bug in dollar quote parsing. It assumes that any potential
> dollar quote start will have an end tag.

If it thinks that's a dollar quote start, it's wrong already... that's
a perfectly valid table name. (Although personally I'd suggest that the
OP avoid dollar signs in identifiers, since they're none too portable.)

regards, tom lane


Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out. --0-1212111318-1184062090=:85878--