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

From: Michael Paesold <mpaesold(at)gmx(dot)at>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kris Jurka <books(at)ejurka(dot)com>, Altaf Malik <mmalik_altaf(at)yahoo(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Unable to prepare a statement when the object names contain more than one $ symbol
Date: 2007-07-10 12:47:09
Message-ID: 46937FCD.7060409@gmx.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Tom Lane schrieb:
> 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.)

I guess I missed that case when implementing dollar quoting in the
driver. I will have a look at it shortly.

Best Regards
Michael Paesold

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Diego Zanga 2007-07-11 09:07:49 postgres jdbc into eclipse plugin (OID problems)
Previous Message Gregory Stark 2007-07-10 11:32:20 Re: Unable to prepare a statement when the object names contain more than one $ symbol