Re: Why format() adds double quote?

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 07:06:13
Message-ID: CAFj8pRCVsLk2+VBmiEwtLNVdwhFPpmGYkJu-HCW_ONpcs8r70A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2016-01-27 6:24 GMT+01:00 Tatsuo Ishii <ishii(at)postgresql(dot)org>:

> >> > 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.
>
> I just wanted to demonstrate multibyte chars including ASCII white
> spaces can be an identifier.
>

I understand now.

>
> > We should to test white chars too.
>
> What do you exactly propose regarding white chars and multibyte chars
> here? Maybe you propose to consider non ASCII white spaces (treate
> them as ASCII white spaces)?
>

I propose the work with UTF white chars should be same like ASCII white
chars. The current design is too simple - with possible pretty bad issues.
Daniel's example is good - there is big gap in design.

Regards

Pavel

>
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
>
> > 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
> >>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2016-01-27 07:25:56 Re: Why format() adds double quote?
Previous Message Jinhua Luo 2016-01-27 06:04:33 Re: insert/update performance