Re: csv format for psql

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: csv format for psql
Дата
Msg-id 20181109121110.GB22720@paquier.xyz
обсуждение исходный текст
Ответ на Re: csv format for psql  ("Daniel Verite" <daniel@manitou-mail.org>)
Ответы Re: csv format for psql  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-hackers
On Fri, Nov 09, 2018 at 11:40:44AM +0100, Daniel Verite wrote:
> The above is meant to accept a multibyte character as the separator,
> in which case strlen(value) would be greater than 1.

Still what's the point except complicating the code?  We don't care
about anything fancy in the backend-side ProcessCopyOptions() when
checking cstate->delim, and having some consistency looks like a good
thing to me.

I am also questioning a couple of things: it is possible to choose
freely how to represent a null value thanks to "\pset null", which gives
an equivalent to the COPY option.  Choosing if a header is present or
not can be done with tuples_only.  However there is no option to specify
an escape character, no option to specify a quote character, and it is
not possible to force quotes for all values.  Those are huge advantages
as any output can be made compatible with other CSV variants.  Isn't
what is presented too limited?  \copy has at least the advantage to push
down those responsibilities to the backend..
--
Michael

Вложения

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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Libpq support to connect to standby server as priority
Следующее
От: Evgeniy Efimkin
Дата:
Сообщение: Re: Special role for subscriptions