Re: Escaping from blocked send() reprised.

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: <robertmhaas(at)gmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Escaping from blocked send() reprised.
Date: 2014-09-10 15:53:03
Message-ID: 541073DF.70902@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Wrong thread...

On 09/10/2014 03:04 AM, Kyotaro HORIGUCHI wrote:
> Hmm. Sorry, I misunderstood the specification.
>
>> You approach that coloring tokens seems right, but you have
>> broken the parse logic by adding your code.
>>
>> Other than the mistakes others pointed, I found that
>>
>> - non-SQL-ident like tokens are ignored by their token style,
>> quoted or not, so the following line works.
>>
>> | "local" All aLL trust
>>
>> I suppose this is not what you intended. This is because you have
>> igonred the attribute of a token when comparing it as
>> non-SQL-ident tokens.
>>
>>
>> - '+' at the head of the sequence '+"' is treated as the first
>> character of the *quoted* string. e.g. +"hoge" is tokenized as
>> "+hoge":special_quoted.
>
> I found this is what intended. This should be documented as
> comments.
>
> |2) users and user-groups only requires special handling and behavior as follows
> | Normal user :
> | A. unquoted ( USER ) will be treated as user ( downcase ).
> | B. quoted ( "USeR" ) will be treated as USeR (case-sensitive).
> | C. quoted ( "+USER" ) will be treated as normal user +USER (i.e. will not be considered as user-group) and case-sensitive as string is quoted.
>
> This seems confising with the B below. This seems should be
> rearranged.
>
> | User Group :
> | A. unquoted ( +USERGROUP ) will be treated as +usergruop ( downcase ).
> | B. plus quoted ( +"UserGROUP" ) will be treated as +UserGROUP (case-sensitive).
>
>
>
>> This is why you simply continued processing for '+"' without
>> discarding and skipping the '+', and not setting in_quote so the
>> following parser code works as it is not intended. You should
>> understand what the original code does and insert or modify
>> logics not braeking the assumptions.
>
> regards,
>

--
- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Gierth 2014-09-10 16:16:21 Re: Final Patch for GROUPING SETS - unrecognized node type: 347
Previous Message Robert Haas 2014-09-10 15:43:52 Re: Memory Alignment in Postgres