Re: COPY WITH CSV FORCE QUOTE * -- REVIEW - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: COPY WITH CSV FORCE QUOTE * -- REVIEW
Date
Msg-id 4A5F75B3.9020405@agliodbs.com
Whole thread Raw
In response to Re: COPY WITH CSV FORCE QUOTE *  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: COPY WITH CSV FORCE QUOTE * -- REVIEW  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
All,

1) Patch applies cleanly against CVS head.

2) Patch compiles and builds cleanly.

3) Unable to check docs because of general doc build problems.

4) Tested the following commands, using a 10MB table of PostgreSQL log data:

postgres=# COPY marchlog TO '/tmp/marchlog1.csv' with csv header;
COPY 81097
postgres=# COPY marchlog TO '/tmp/marchlog2.csv' with csv header force 
quote *;
COPY 81097
postgres=# COPY marchlog TO '/tmp/marchlog3.csv' with csv header force 
quote process_id;
COPY 81097
postgres=# COPY marchlog TO '/tmp/marchlog4.csv' with csv force quote *;
COPY 81097
postgres=# COPY marchlog TO '/tmp/marchlog5.csv' with force quote *;
ERROR:  COPY force quote available only in CSV mode
STATEMENT:  COPY marchlog TO '/tmp/marchlog5.csv' with force quote *;
ERROR:  COPY force quote available only in CSV mode

postgres=# COPY reloadlog FROM '/tmp/marchlog2.csv' with csv header;
COPY 81097

postgres-# \copy marchlog TO '/tmp/marchlog5.csv' with csv force quote *;
postgres-#

Per discussion, I did not test FORCE QUOTE NOT NULL *.

All output looked as expected.  This patch did not seem to change 
eariler functionality, and seems to quote as specified.

Unless there are other things we want to test (CLOBs?) I think the patch 
is probably ready for code review of the FORCE QUOTE * portion.

-- 
Josh Berkus
PostgreSQL Experts Inc.
www.pgexperts.com


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Docbook toolchain interfering with patch review?
Next
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] pg_migrator not setting values of sequences?