Skip site navigation (1) Skip section navigation (2)

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 (view raw, whole thread or download thread mbox)
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: jdbc-dollar-quote-bug.patch
Description: text/x-patch (3.5 KB)

In response to

pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group