Re: Fixing backslash dot for COPY FROM...CSV

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: Fixing backslash dot for COPY FROM...CSV
Дата
Msg-id 984e45ea-591a-4f6e-8f1f-165589495500@manitou-mail.org
обсуждение исходный текст
Ответ на Re: Fixing backslash dot for COPY FROM...CSV  (vignesh C <vignesh21@gmail.com>)
Ответы Re: Fixing backslash dot for COPY FROM...CSV  (vignesh C <vignesh21@gmail.com>)
Re: Fixing backslash dot for COPY FROM...CSV  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-hackers
    vignesh C wrote:

> I noticed that these tests are passing without applying patch too:

> +insert into copytest2(test) values('line1'), ('\.'), ('line2');
> +copy (select test from copytest2 order by test collate "C") to :'filename'
> csv;
> +-- get the data back in with copy
> +truncate copytest2;
> +copy copytest2(test) from :'filename' csv;
> +select test from copytest2 order by test collate "C";
>
> I was not sure if this was intentional. Can we add a test which fails
> in HEAD and passes with the patch applied.

Thanks for checking this out.
Indeed, that was not intentional. I've been using static files
in my tests and forgot that if the data was produced with
COPY OUT, it would quote backslash-dot so that COPY IN could
reload it without problem.

PFA an updated version that uses \qecho to produce the
data instead of COPY OUT. This test on unpatched HEAD
shows that copytest2 is missing 2 rows after COPY IN.


Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
Twitter: @DanielVerite

Вложения

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

Предыдущее
От: Fabrice Chapuis
Дата:
Сообщение: pg_waldump
Следующее
От: shveta malik
Дата:
Сообщение: Re: Synchronizing slots from primary to standby