Re: csv format for psql

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: csv format for psql
Дата
Msg-id CAFj8pRADDHybDPFNNsLamNNdjQGMYekUoGuAfX3oVWSeRm99RQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: csv format for psql  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers


pá 9. 11. 2018 v 6:57 odesílatel Michael Paquier <michael@paquier.xyz> napsal:
On Thu, Nov 08, 2018 at 01:58:34PM +0900, Michael Paquier wrote:
> Anyway, I am still going through the patch, so no need to send a new
> version for now.

Okay, I have done a round of more in-depth review, and the patch looks
to be in pretty good shape.

Relying on tuples_only to decide if the header should be printed or not
looks good to me.

+    /* 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)

Attached is what I am finishing up with for the moment.  Comments are
welcome.  I am still planning look at that stuff a bit more once again,
particularly the printing part, but I am lacking of time now..

looks ok

Pavel

--
Michael

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: Speeding up INSERTs and UPDATEs to partitioned tables
Следующее
От: Amit Langote
Дата:
Сообщение: Re: speeding up planning with partitions