Re: csv format for psql

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: csv format for psql
Дата
Msg-id 1bc4d7e8-757a-46aa-a5bb-2bd25d733786@manitou-mail.org
обсуждение исходный текст
Ответ на Re: csv format for psql  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: csv format for psql
Список pgsql-hackers
    Fabien COELHO wrote:

> Doc: "according to the csv rules" -> "according to csv rules."?

Fixed.

> Doc: "RFC-4180" -> "RFC 4180"?

Fixed. The other references to RFCs use this syntax indeed.

> The previous RFC specifies CRLF as eol, but '\n' is hardcoded in the
> source. I'm fine with that, but I'd suggest that the documentation should
> said which EOL is used.

'\n' gets translated by libc when the output is in text mode.
We discussed this upthread, but maybe it should be a code comment:
added now.

> ISTM that "--csv" & "-C" are not documented, neither in sgml nor under
> --help.
>
> "fieldsep_csv" does not show on the list of output options under "\?".

Oops, fixed.

> There seems to be a test in the code to set an empty string "" by default,
> but it is unclear to me when this is triggered.

Where is that code?

> I'd tend to use "CSV" instead of "csv" everywhere it makes sense, eg in
> the doc (CSV rules) and in variable names in the code (FooCsv -> FooCSV?),
> but that is pretty debatable.

I've changed to upper case in a couple places and added <acronym> tags,
but depending on the context sometimes lower case feels more consistent.
This is the same as, for instance, ASCII. We display \pset linestyle as
ascii, not ASCII, presumably because everything else in the \pset area
is lower case. But both cases are accepted in input.

Also added a CSV entry in the doc index per Alvaro's suggestion in
https://www.postgresql.org/message-id/20180809202125.r4mdx2jzm7hytetz@alvherre.pgsql
with pointers to psql and COPY.


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Query is over 2x slower with jit=on
Следующее
От: Jim Finnerty
Дата:
Сообщение: Re: Removing useless DISTINCT clauses