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.
> Besides, "single" as a format name does not sound right. > Generally the name for a text format designates a set > of characteristics meaning that certain combinations of > characters have specific behaviors. > Sometimes "plain" is used in the context of text formats > to indicate that no character is special ("plain" is also the > default subtype of "text" in MIME types). > > "single" as proposed is to be understood as "single-column", > which is a consequence of the lack of a field delimiter, but > not an intrinsic characteristic of the format. > If COPY accepted fixed-length fields, it could be in a > no-delimiter no-escape mode and still handle multiple > columns, in opposition to what "single" suggests.
Good points. I agree "plain" is a better name.
I'm on board with a new named format that selects the desired defaults instead of requiring the user to know and change them all manually.
This seems to me like a "list" format. Implying each row is a list entry. Since we have tables the concept of list would likewise reasonably imply a single column.
Since newlines are special, i.e., record delimiters, "plain" thus would remain misleading. It could be used for a case where the entire file is loaded into a new row, single column.