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

Re: [HACKERS] dollar quoting

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>,"Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] dollar quoting
Date: 2004-02-09 07:05:02
Message-ID: 4027311E.9090907@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches

Tom Lane wrote:

>A bigger problem here:
>
>  
>
>>+             else if (!dol_quote && line[i] == '$' && 
>>+                      !isdigit(line[i + thislen]) && 
>>+                      (dol_end = strchr(line+i+1,'$')) != NULL &&
>>+                      (i == 0 || 
>>+                       ! ((line[i-1] & 0x80) != 0 || isalnum(line[i-1]) || 
>>+                          line[i-1] == '_')))
>>+             {
>>    
>>
>
>is that you aren't checking that what comes between the two dollar signs
>looks like empty-or-an-identifier.  The check for
>next-char-isn't-a-digit is part of that but not the only part.
>  
>


Well, I think the right way to do a full check would be with a regex, 
which I had hoped to avoid. However, I will now try to get one working 
and to address your other concerns.

Thanks for the comments.

cheers

andrew


In response to

pgsql-hackers by date

Next:From: Josh BerkusDate: 2004-02-09 07:13:12
Subject: Re: session persistent data for plperl
Previous:From: Alex J. AvrietteDate: 2004-02-09 06:54:09
Subject: Re: RFC: Very large scale postgres support

pgsql-patches by date

Next:From: Magnus HaganderDate: 2004-02-09 12:21:18
Subject: Re: win32 inode fix
Previous:From: Tom LaneDate: 2004-02-09 06:25:10
Subject: Re: [HACKERS] dollar quoting

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