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

From: Michael Paesold <mpaesold(at)gmx(dot)at>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-10-18 16:31:47
Message-ID: 47178A73.9070500@gmx.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Now including the attachement... ;-)

Michael Paesold wrote:
> I wrote:
> ...
>> 1) In parseDollarQuotes(), we look at the character directly before
>> the $-char and compare it against all valid identifier characters. If
>> it is, we don't have a possible dollar-quote start:
>>
>> From scan.l:
>> ident_start [A-Za-z\200-\377_]
>> ident_cont [A-Za-z\200-\377_0-9\$]
> ...
>> Looking at gram.y and scan.l (...but I'm no expert) I can't see
>> another case of a dollar-character that I missed, except the one
>> allowed in ident_cont... so option 1) seems like the easiest solution.
>> I will send a patch implementing option 1 shortly.
>
> Ok, here is the patch. It also adds your tests exposing the bug to the
> test suite. The patch fixes both test cases and passes all other
> regression tests (at least with JDK 1.5....). Does it look OK to you?
>
> Should we do anything additional about error-ing out when we detect an
> unterminated dollar-quote (see previous mail)?
>
> Best Regards
> Michael Paesold

Attachment Content-Type Size
jdbc-dollar-quote-bug.patch text/x-patch 3.5 KB

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Mark Lewis 2007-10-18 17:34:17 Re: Fw: postgresql experts please help
Previous Message Michael Paesold 2007-10-18 16:27:40 Re: Unable to prepare a statement when the object names contain more than one $ symbol