Re: csv format for psql

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Daniel Verite <daniel(at)manitou-mail(dot)org>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: csv format for psql
Date: 2018-03-08 07:29:39
Message-ID: CAFj8pRAmBOqf4pN2wAgNd1z2EDFDFL=YvqXMC1wy5O-9YjvGaw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2018-03-07 22:16 GMT+01:00 David Fetter <david(at)fetter(dot)org>:

> On Wed, Mar 07, 2018 at 09:37:26PM +0100, Pavel Stehule wrote:
> > 2018-03-07 21:31 GMT+01:00 Daniel Verite <daniel(at)manitou-mail(dot)org>:
> >
> > > David Fetter wrote:
> > >
> > > > We have some inconsistency here in that fewer table formats are
> > > > supported, but I think asciidoc, etc., do this correctly via
> > > > invocations like:
> > > >
> > > > psql -P format=asciidoc -o foo.adoc -AtXc 'TABLE foo'
> > >
> > > -A is equivalent to -P format=unaligned, so in the above
> > > invocation, it cancels the effect of -P format=asciidoc.
> > > Anyway -P format=name on the command line
> > > is the same as "\pset format name" as a
> > > metacommand, so it works for all formats.
> > >
> > > Some formats (unaligned, html) have corresponding
> > > command-line options (-A, -H), and others don't.
> > > In this patch, -C is used so that csv would be in the
> > > category of formats that can be switched on with the simpler
> > > invocation on the command line.
> > > If we don't like that, we can leave out -C for future use
> > > and let users write -P format=csv.
> > > That's not the best choice from my POV though, as csv
> > > is a primary choice to export tabular data.
> > >
> >
> > -C can be used for certificates or some similar. I like csv, but I am not
> > sure, so it is too important to get short option (the list of free chars
> > will be only shorter)
>
> +1 for not using up a single-letter option for this.
>

Is there some rule, so alone long options are disallowed? When this
software will be more mature, then we cannot to find "inteligent" short
option for lot of tasks.

Regards

Pavel

>
> Best,
> David.
> --
> David Fetter <david(at)fetter(dot)org> http://fetter.org/
> Phone: +1 415 235 3778
>
> Remember to vote!
> Consider donating to Postgres: http://www.postgresql.org/about/donate
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2018-03-08 07:45:30 Re: [HACKERS] Partition-wise aggregation/grouping
Previous Message Pavel Stehule 2018-03-08 07:25:12 Re: INOUT parameters in procedures