Joel Jacobson schrieb am 05.05.2021 um 17:30:
> Could it be an idea to exploit the fact that DELIMITER E'\n' is currently an error?
>
> ERROR: COPY delimiter cannot be newline or carriage return
>
> That is, to change E'\n' to be a valid delimiter, which would simply read each line
> delimited by newlines, as a single column.
>
> The hack I'm currently abusing is to find some one-byte character that is not present anywhere in the text file,
> and then to use that character as a delimiter. This doesn't work when needing to deal with a text file
> which content is unknown at the time when writing the code though, so it's mostly useful for throwaway one-off
queries.
What about
delimiter E'\1'
The probability that a file contains the ASCII "character" 1 seems rather low.
Thomas