Re: csv format for psql

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
Cc: "Peter Eisentraut" <peter(dot)eisentraut(at)2ndquadrant(dot)com>,"Fabien COELHO" <coelho(at)cri(dot)ensmp(dot)fr>,"Isaac Morland" <isaac(dot)morland(at)gmail(dot)com>,"David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>,"David Steele" <david(at)pgmasters(dot)net>,"PostgreSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: csv format for psql
Date: 2018-08-10 10:25:49
Message-ID: e8fc1735-c354-460f-aa21-75ec20809685@manitou-mail.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule wrote:

> > On the whole I'm inclined to resubmit the patch with
> > fieldsep_csv and some minor changes based on the rest
> > of the discussion.
> >
>
> +1

PFA an updated version.
Usage from the command line:
$ psql --csv # or -P format=csv
$ psql --csv -P fieldsep_csv=";" # for non-comma csv separator

From inside psql:

\pset format csv
\pset fieldsep_csv '\t'

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

Attachment Content-Type Size
psql-csv-format-v5.patch text/plain 16.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2018-08-10 10:27:49 Re: Constraint documentation
Previous Message Alexander Korotkov 2018-08-10 10:10:51 Re: Postgres 11 release notes