OSDN Git Service

The attached applied patch throws an error if the delimiter appears in
authorBruce Momjian <bruce@momjian.us>
Tue, 6 Apr 2004 13:21:33 +0000 (13:21 +0000)
committerBruce Momjian <bruce@momjian.us>
Tue, 6 Apr 2004 13:21:33 +0000 (13:21 +0000)
commit4a72dbc1aee1890f2952070ba125796ab0309367
tree721277a412fc7d37d09f958740a59e498518d9fa
parent5e9f4d26bce4082033dfc5c3c84e0011e7714f1d
The attached applied patch throws an error if the delimiter appears in
the COPY NULL string:

        test=> copy pg_language to '/tmp/x' with delimiter '|';
        COPY
        test=> copy pg_language to '/tmp/x' with delimiter '|' null '|x';
        ERROR:  COPY delimiter must not appear in the NULL specification
        test=> copy pg_language from '/tmp/x' with delimiter '|' null '|x';
        ERROR:  COPY delimiter must not appear in the NULL specification

It also throws an error if it conflicts with the default NULL string:

        test=> copy pg_language to '/tmp/x' with delimiter '\\';
        ERROR:  COPY delimiter must not appear in the NULL specification
        test=> copy pg_language to '/tmp/x' with delimiter '\\' NULL 'x';
        COPY
src/backend/commands/copy.c