Re: csv format for psql

Daniel Verite <daniel@manitou-mail.org>

From: "Daniel Verite" <daniel@manitou-mail.org>
To: "Michael Paquier" <michael@paquier.xyz>
Cc: "Fabien COELHO" <coelho@cri.ensmp.fr>,"PostgreSQL Hackers" <pgsql-hackers@postgresql.org>
Date: 2018-11-09T10:40:44Z
Lists: pgsql-hackers
	Michael Paquier wrote:

> +    /* check for value being non-empty and with an MB length of 1 */
> +    if (*value == '\0' || value[PQmblen(value, pset.encoding)] != '\0')
> 
> It seems to me that this can just be replaced with that:
> if (strlen(value) != 1)

The above is meant to accept a multibyte character as the separator,
in which case strlen(value) would be greater than 1.

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


Commits

  1. Add CSV table output mode in psql.

  2. Reorganize format options of psql in alphabetical order

  3. Complete TODO item: