Re: Escaping from blocked send() reprised.
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
From: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
To: hlinnakangas@vmware.com
Cc: robertmhaas@gmail.com, pgsql-hackers@postgresql.org
Date: 2014-09-10T00:04:21Z
Lists: pgsql-hackers
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, -- Kyotaro Horiguchi NTT Open Source Software Center
Commits
-
Assert that WaitLatchOrSocket callers cannot wait only for writability.
- e42a21b9e6c9 9.2.0 cited