Skip site navigation (1) Skip section navigation (2)

Re: Unable to prepare a statement when the object names contain more than one $ symbol

From: Altaf Malik <mmalik_altaf(at)yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kris Jurka <books(at)ejurka(dot)com>
Cc: Altaf Malik <mmalik_altaf(at)yahoo(dot)com>, pgsql-jdbc(at)postgresql(dot)org, mpaesold(at)gmx(dot)at
Subject: Re: Unable to prepare a statement when the object names contain more than one $ symbol
Date: 2007-07-10 10:08:10
Message-ID: 322907.85878.qm@web39109.mail.mud.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
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(at)sss(dot)pgh(dot)pa(dot)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.

In response to

Responses

pgsql-jdbc by date

Next:From: Gregory StarkDate: 2007-07-10 11:32:20
Subject: Re: Unable to prepare a statement when the object names contain more than one $ symbol
Previous:From: Tom LaneDate: 2007-07-09 16:45:58
Subject: Re: Unable to prepare a statement when the object names contain more than one $ symbol

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group