Re: Why format() adds double quote? - Mailing list pgsql-hackers

From Dickson S. Guedes
Subject Re: Why format() adds double quote?
Date
Msg-id CAHHcrerFYPB0+4p3H3hvt8O-HwNYkAaY+bcxyx6PQ4tfm1snnA@mail.gmail.com
Whole thread Raw
In response to Re: Why format() adds double quote?  (Tatsuo Ishii <ishii@postgresql.org>)
List pgsql-hackers
2016-01-26 23:40 GMT-02:00 Tatsuo Ishii <ishii@postgresql.org>:
>> 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 " ?
>
> This is a totally different story from the topic discussed in this
> thread. psql never adds double quotations to column name even with
> upper case col names.

Indeed, you are right.

> If you want to change the existing psql's behavior, propose it
> yourself.

It could be interesting, maybe using a \pset quote_columns_char, I'll
think about, thank you.

Best regards.
--
Dickson S. Guedes
mail/xmpp: guedes@guedesoft.net - skype: guediz
http://github.com/guedes - http://guedesoft.net
http://www.postgresql.org.br



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: extend pgbench expressions with functions
Next
From: Tatsuo Ishii
Date:
Subject: Re: Why format() adds double quote?