Re: New "single" COPY format - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: New "single" COPY format
Date
Msg-id CAKFQuwbthgMQeU-h3mypWfwvoZyLjcw8-bo-EhtNt8vA+Vw4Ng@mail.gmail.com
Whole thread Raw
In response to Re: New "single" COPY format  (jian he <jian.universality@gmail.com>)
Responses Re: New "single" COPY format
List pgsql-hackers
On Saturday, November 9, 2024, jian he <jian.universality@gmail.com> wrote:

   <para>
    The <literal>list</literal> format does not distinguish a
<literal>NULL</literal>
    value from an empty string. Empty lines are imported as empty strings, not
    as <literal>NULL</literal> values.
   </para>
we only mentioned import, not export (COPY TO) dealing with
NULL value.


Yeah, while not being able to distinguish between the two is consistent with the list format’s premise/design the choice would need to resolve to the null value in order to continue to be data-type agnostic.  We’d simply have to note for the text types that empty strings in lists are not supported, and if encountered will be resolved to a null value.

David J.

pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: Re: New "single" COPY format
Next
From: Laurenz Albe
Date:
Subject: Re: How to get started with contribution