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

From Teodor Sigaev
Subject Re: proposal: function parse_ident
Date
Msg-id 56E6E941.7030507@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
Re: proposal: function parse_ident
List pgsql-hackers
> I afraid so I cannot to fix this inconsistency (if this is inconsistency - the
> binary values are same) - the parameter of function is raw string with processed
> escape codes, and I have not any information about original escape sequences.
> When you enter octet value, and I show it as hex value, then there should be
> difference. Buy I have not information about your input (octet or hex). I have
> the original string of SQL identifier inside parser, executor, but I have not
> original string of function parameter inside function (not without pretty
> complex and long code).
Ok, agree

>
> I am trying describe it in doc (I am sorry for my less level English) in new
> patch. Fixed duplicated oid too.
Edited a bit + fix some typos and remove unneeded headers, patch attached

Sorry, I can't find all corner-cases at once, but:
SELECT parse_ident(E'"c".X XXXXXXXXXX');
ERROR:  identifier contains disallowed characters: "\"c"

Error message wrongly points to the reason of error.




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

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] Use correct types and limits for PL/Perl SPI query results
Next
From: Alvaro Herrera
Date:
Subject: Re: [COMMITTERS] pgsql: Refactor to create generic WAL page read callback