Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id E1DB09FBB88 for ; Mon, 9 Jul 2007 13:31:46 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 65042-05-2 for ; Mon, 9 Jul 2007 13:31:42 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail63.csoft.net (leary.csoft.net [205.205.214.5]) by postgresql.org (Postfix) with SMTP id B7A699FB778 for ; Mon, 9 Jul 2007 13:31:42 -0300 (ADT) Received: (qmail 3218 invoked by uid 1112); 9 Jul 2007 16:31:41 -0000 Date: Mon, 9 Jul 2007 12:31:41 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Altaf Malik cc: pgsql-jdbc@postgresql.org, mpaesold@gmx.at Subject: Re: Unable to prepare a statement when the object names contain more than one $ symbol In-Reply-To: <540504.87872.qm@web39103.mail.mud.yahoo.com> Message-ID: References: <540504.87872.qm@web39103.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/35 X-Sequence-Number: 17209 On Mon, 9 Jul 2007, Altaf Malik wrote: > I have a table with two columns of type varchar and the table name > contains two dollars. I am unable to prepare a statement for this table. > Here is the code: > > PreparedStatement pstmt = con.prepareStatement("insert into a$b$c > values( ? , ?)"); > Exception in thread "main" org.postgresql.util.PSQLException: The column index is out of range: 1, number of columns: 0. This is a bug in dollar quote parsing. It assumes that any potential dollar quote start will have an end tag. When it doesn't find the end it reports the end of the query, so the driver ends up skipping over the "?" parameters. Kris Jurka