From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
Cc: | Daniel Verite <daniel(at)manitou-mail(dot)org>, "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Why format() adds double quote? |
Date: | 2016-01-27 05:15:36 |
Message-ID: | CAFj8pRBMU2tPsTJuamKCiQJxCMu8A7-GYoSO60tbEpF=ZpgO4A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2016-01-27 6:13 GMT+01:00 Tatsuo Ishii <ishii(at)postgresql(dot)org>:
> > 2016-01-26 21:00 GMT+01:00 Daniel Verite <daniel(at)manitou-mail(dot)org>:
> >
> >> Tatsuo Ishii wrote:
> >>
> >> > IMO, it's a bug or at least an inconsistency
> >>
> >> Personally I don't see this change being good for everything.
> >>
> >> Let's play devil's advocate:
> >>
> >> create table abc(U&"foo\2003" int);
> >>
> >> U+2003 is 'EM SPACE', in Unicode's General Punctuation block.
> >>
> >> With the current version, format('%I', attname) on this column is:
> >> "foo "
> >>
> >> With the patched version, it produces this:
> >> foo
> >>
> >> So the visual hint that there are more characters at the end is lost.
> >>
> >
> > I can agree, so current behave can be useful in some cases, but still it
> is
> > bug (inconsistency) between PostgreSQL parser and PostgreSQL escaping
> > functions.
> >
> > Currently, any multibyte char can be unescaped identifier (only
> apostrophes
> > are tested). We should to test white chars too.
>
> Really? I thought we do that test.
>
what you are expecting from this test? UTF single quotes are tested only in
quote functions probably.
Pavel
>
> test=# create table t6("あいう えお" int);
> CREATE TABLE
> test=# \d t6
> Table "public.t6"
> Column | Type | Modifiers
> -------------+---------+-----------
> あいう えお | integer |
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2016-01-27 05:24:01 | Re: Why format() adds double quote? |
Previous Message | Tatsuo Ishii | 2016-01-27 05:13:07 | Re: Why format() adds double quote? |