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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: 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-09 16:45:58
Message-ID: 23286.1183999558@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Kris Jurka <books(at)ejurka(dot)com> 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Altaf Malik 2007-07-10 10:08:10 Re: Unable to prepare a statement when the object names contain more than one $ symbol
Previous Message Kris Jurka 2007-07-09 16:31:41 Re: Unable to prepare a statement when the object names contain more than one $ symbol