Re: Why format() adds double quote?
| От | Dickson S. Guedes |
|---|---|
| Тема | Re: Why format() adds double quote? |
| Дата | |
| Msg-id | CAHHcrepPun4=-cVJc9cZQtuw0mP6-kKAbfT_+bU3LZkw2t-hvA@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Why format() adds double quote? ("Daniel Verite" <daniel@manitou-mail.org>) |
| Ответы |
Re: Why format() adds double quote?
|
| Список | pgsql-hackers |
2016-01-26 18:00 GMT-02:00 Daniel Verite <daniel@manitou-mail.org>:
> ...
> 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.
Thanks for advocate, I see here that it even produces that output with
simple spaces.
postgres=# create table x ("aí " text);
CREATE TABLE
postgres=# \d x Tabela "public.x" Coluna | Tipo | Modificadores
----------+------+---------------aí | text |
This will break copy&paste user actions and scripts that parses that output.
Maybe the patch should consider left/right non-printable chars to
choose whether to show or not the " ?
[]s
--
Dickson S. Guedes
mail/xmpp: guedes@guedesoft.net - skype: guediz
http://github.com/guedes - http://guedesoft.net
http://www.postgresql.org.br
В списке pgsql-hackers по дате отправления: