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

From Daniel Verite
Subject Re: csv format for psql
Date
Msg-id 57be15f5-2f1b-4595-94f9-facdeacba571@manitou-mail.org
Whole thread Raw
In response to Re: csv format for psql  (Michael Paquier <michael@paquier.xyz>)
Responses Re: csv format for psql
List 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


pgsql-hackers by date:

Previous
From: "Kato, Sho"
Date:
Subject: RE: Performance improvements of INSERTs to a partitioned table
Next
From: "Daniel Verite"
Date:
Subject: Alternative to \copy in psql modelled after \g