Re: proposal: function parse_ident - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: proposal: function parse_ident
Date
Msg-id 56E18601.8090302@sigaev.ru
Whole thread Raw
In response to Re: proposal: function parse_ident  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: proposal: function parse_ident  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
>         select
>         parse_ident(E'X\rXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
>
>
> I am sending updated patch - I used json function for correct escaping - the
> escaping behave is same.

Hmm, it doesn't look so:
% select parse_ident(E'_\005');
ERROR:  identifier contains disallowed characters: "_\u0005"
% select parse_ident(E'\005');
ERROR:  missing identifier: "\u0005"

but

# select parse_ident(E'"\005"'); parse_ident
------------- {\x05}

Error messages above point wrong character wrongly.

One more inconsistence:
# select parse_ident(E'"\005"') as "\005";  \005
-------- {\x05}

Display outputs of actual identifier and parse_indent are differ.

Actually, I can live with both but are any other opinions? Seems, at least 
difference of actual identifier and output of parse_indent should be pointed in 
docs.

-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [PROPOSAL] VACUUM Progress Checker.
Next
From: Alvaro Herrera
Date:
Subject: Re: utils/misc: Simplify search of end of argv in save_ps_display_args()