Re: proposal \gcsv

Daniel Verite <daniel@manitou-mail.org>

From: "Daniel Verite" <daniel@manitou-mail.org>
To: "Erik Rijkers" <er@xs4all.nl>
Cc: "Pavel Stehule" <pavel.stehule@gmail.com>,"Vik Fearing" <vik@postgresfriends.org>,"PostgreSQL Hackers" <pgsql-hackers@postgresql.org>
Date: 2020-03-28T14:06:05Z
Lists: pgsql-hackers
	Erik Rijkers wrote:

> 2. let the psql command-line option '--csv' honour the value given by  
> psql -F/--field-separator (it does not do so now)
>
> or
> 
> 3. add an psql -commandline option:
>     --csv-field-separator

Setting the field separator on the command line is already supported
through this kind of invocation:

psql --csv -P csv_fieldsep=$'\t'

bash expands $'\t' to a tab character. Other shells might need
different tricks.


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



Commits

  1. Allow psql's \g and \gx commands to transiently change \pset options.