Skip site navigation (1) Skip section navigation (2)

pgsql: Disallow digits and lower-case ASCII letters as the delimiter in

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Disallow digits and lower-case ASCII letters as the delimiter in
Date: 2007-12-27 18:28:58
Message-ID: 20071227182858.A05E37540F0@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Disallow digits and lower-case ASCII letters as the delimiter in non-CSV
COPY.  We need a restriction here because when the delimiter occurs as a
data character, it is emitted with a backslash, and that will only work
as desired if CopyReadAttributesText() will interpret the backslash sequence
as representing the second character literally.  This is currently untrue
for 'b', 'f', 'n', 'r', 't', 'v', 'x', and octal digits.  For future-proofing
and simplicity of explanation, it seems best to disallow a-z and 0-9.
We must also disallow dot, since "\." by itself would look like copy EOF.
Note: "\N" is by default the null print string, so N would also cause a
problem, but that is already tested for.

Modified Files:
--------------
    pgsql/src/backend/commands:
        copy.c (r1.292 -> r1.293)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/copy.c?r1=1.292&r2=1.293)

pgsql-committers by date

Next:From: Tom LaneDate: 2007-12-28 00:23:24
Subject: pgsql: Improve consistency of error reporting in GUC assign_hook
Previous:From: Tom LaneDate: 2007-12-27 17:00:56
Subject: pgsql: Fix ill-advised usage of x?y:z expressions in errmsg() and

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group