Re: csv format for psql - Mailing list pgsql-hackers

From Daniel Verite
Subject Re: csv format for psql
Date
Msg-id 15870190-96fe-4e35-9f11-5e7004236f50@manitou-mail.org
Whole thread Raw
In response to Re: csv format for psql  ("Daniel Verite" <daniel@manitou-mail.org>)
Responses Re: csv format for psql  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
    I wrote:

> A proposed fix is attached. print_csv_vertical() is left unchanged
> because it's not possible currently to end up with \. alone
> on a line with the expanded display

On second thought, it is possible

postgres=# \pset format csv
Output format is csv.

postgres=# \pset fieldsep_csv '.'
Field separator for CSV is ".".

postgres=# \x
Expanded display is on.

postgres=# select '' as "\" ;
\.

PFA an upgraded fix.


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

Attachment

pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: Copy function for logical replication slots
Next
From: Stephen Frost
Date:
Subject: Re: pgsql: Integrate recovery.conf into postgresql.conf