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

From: Michael Paesold <mpaesold(at)gmx(dot)at>
To: Michael Paesold <mpaesold(at)gmx(dot)at>
Cc: Kris Jurka <books(at)ejurka(dot)com>, 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:27:40
Message-ID: 4717897C.8070909@gmx.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Michael Paesold 2007-10-18 16:31:47 Re: Unable to prepare a statement when the object names contain more than one $ symbol
Previous Message Michael Paesold 2007-10-18 15:43:10 Re: Unable to prepare a statement when the object names contain more than one $ symbol