Unworkable column delimiter characters for COPY - Mailing list pgsql-hackers

From Tom Lane
Subject Unworkable column delimiter characters for COPY
Date
Msg-id 5426.1198769827@sss.pgh.pa.us
Whole thread Raw
Responses Re: Unworkable column delimiter characters for COPY  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Currently, copy.c rejects newline, carriage return, and backslash as
settings for the column delimiter character (in non-CSV mode).  These
all seem necessary to avoid confusion.  However, I just noticed that the
letters r, n, t, etc would also not work: on output, data characters
matching such a delimiter would get escaped as \r, \n, etc, which on
input would be read as C-style control characters.

I think at minimum we need to forbid b, f, n, r, t, v, which are the
control character representations currently recognized by COPY.
But I'm tempted to make it reject all 26 lower-case ASCII letters,
as a form of future-proofing.  Thoughts?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andreas 'ads' Scherbaum
Date:
Subject: Re: Binary data type with other output method
Next
From: Andrew Dunstan
Date:
Subject: Re: Binary data type with other output method