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

From David G. Johnston
Subject Re: New "single" COPY format
Date
Msg-id CAKFQuwa3G3WZ+1CB+epYjQpOXZxkQBMrbVJ=ekoWa7cZqSx4xQ@mail.gmail.com
Whole thread Raw
In response to Re: New "single" COPY format  ("Daniel Verite" <daniel@manitou-mail.org>)
Responses Re: New "single" COPY format
List pgsql-hackers
On Saturday, November 9, 2024, Joel Jacobson <joel@compiler.org> wrote:
On Fri, Nov 8, 2024, at 22:47, David G. Johnston wrote:
> On Fri, Nov 8, 2024 at 2:20 PM Joel Jacobson <joel@compiler.org> wrote:
>>
>> 1. Text files containing \. in the middle of the file
>> % cat /tmp/test.txt
>> foo
>> \.
>> bar
>>
>> Or another option to turn off the special meaning of \.?
>
> This does seem like an orthogonal option worth considering.

I agree; if we want to integrate this into 'text', it's an option worth considering.

PostgreSQL cannot store the NUL byte.  Would that be an option for the record separator.  Default to new line but accept NUL if one needs to input/output lists containing newlines.  Or whatever character the user believes is not part of their data - tab probably being a popular option.

David J.

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: New "single" COPY format
Next
From: Nathan Bossart
Date:
Subject: Re: New GUC autovacuum_max_threshold ?