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

From Fabien COELHO
Subject Re: csv format for psql
Date
Msg-id alpine.DEB.2.21.1811070951470.2681@lancre
Whole thread Raw
In response to Re: csv format for psql  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Bonjour Michaël,

> First, it seems to me that it is necessary to overcomplicate the
> interface of psql for that.  Most of the other formats don't have their
> own switch, and it is perfectly possible to use CSV format with just
> --pset=format=csv.

Although this work, it is not very user friendly nor easy to memorize.

Quite a few direct format options already exists, eg -A --no-align (yuk, 
-A means not to align... :-(), -H --html...

In this context "--csv" looks pretty unambiguous and more useful, so I 
would be in favor of keeping this option.

> -C could also be useful for other things, say compression.

Sure. -C is *NOT* used for --csv in the patch, although it may have been 
with an earlier version?

> In the regression tests, "col 9" is wanted with a newline?

Yes, the point is to check whether quoting & escaping are triggered 
appropriately in column names and values.

-- 
Fabien.

pgsql-hackers by date:

Previous
From: Evgeniy Efimkin
Date:
Subject: Connection limit doesn't work for superuser
Next
From: Alexey Kondratov
Date:
Subject: Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line