Re: Unable to prepare a statement when the object names contain more than one $ symbol - Mailing list pgsql-jdbc

From Michael Paesold
Subject Re: Unable to prepare a statement when the object names contain more than one $ symbol
Date
Msg-id 4717897C.8070909@gmx.at
Whole thread Raw
In response to Re: Unable to prepare a statement when the object names contain more than one $ symbol  (Michael Paesold <mpaesold@gmx.at>)
Responses Re: Unable to prepare a statement when the object names contain more than one $ symbol  (Michael Paesold <mpaesold@gmx.at>)
Re: Unable to prepare a statement when the object names contain more than one $ symbol  (Kris Jurka <books@ejurka.com>)
List 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

pgsql-jdbc by date:

Previous
From: Michael Paesold
Date:
Subject: Re: Unable to prepare a statement when the object names contain more than one $ symbol
Next
From: Michael Paesold
Date:
Subject: Re: Unable to prepare a statement when the object names contain more than one $ symbol