Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id F2CC19FB4EA for ; Tue, 16 Oct 2007 12:51:02 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 60635-03 for ; Tue, 16 Oct 2007 12:50:55 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by postgresql.org (Postfix) with SMTP id 6E4F79FA5ED for ; Tue, 16 Oct 2007 12:50:55 -0300 (ADT) Received: (qmail invoked by alias); 16 Oct 2007 15:50:53 -0000 Received: from unknown (EHLO [192.168.1.16]) [85.127.97.158] by mail.gmx.net (mp010) with SMTP; 16 Oct 2007 17:50:53 +0200 X-Authenticated: #1946847 X-Provags-ID: V01U2FsdGVkX1+c8JJWIFGcEJGbi/ZmMPsTQEvdzFjTFXizV7en+n 24uYRQd1Blwegt Message-ID: <4714DDF1.9020403@gmx.at> Date: Tue, 16 Oct 2007 17:51:13 +0200 From: Michael Paesold User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Kris Jurka CC: Tom Lane , Altaf Malik , pgsql-jdbc@postgresql.org Subject: Re: Unable to prepare a statement when the object names contain more than one $ symbol References: <540504.87872.qm@web39103.mail.mud.yahoo.com> <23286.1183999558@sss.pgh.pa.us> <46937FCD.7060409@gmx.at> In-Reply-To: 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: 200710/84 X-Sequence-Number: 17656 Hi Kris, sorry for not coming back to this earlier. Yeah, this is no real solution. I thought about checking the character directly before the dollar quote. But I have not had the time to look at the grammer if that is enough to fix all error cases... I will do so tomorrow. Best Regards Michael Paesold Kris Jurka schrieb: > > > On Tue, 10 Jul 2007, Michael Paesold wrote: > >> Tom Lane schrieb: >>> 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.) >> >> I guess I missed that case when implementing dollar quoting in the >> driver. I will have a look at it shortly. >> > > Did you ever get a chance to look at this? The attached patch fixes the > original complaint by ensuring that the ending tag exists, but as Tom > pointed out that's still not good enough as the second attached test > case demonstrates. > > Kris Jurka >