Importing CSV and commas in string values
问题 I use postgres 8.4 and currently trying to import a trivial CSV: Here is a table: CREATE TABLE public.sample ( a VARCHAR, b VARCHAR ) WITHOUT OIDS; and here is a csv file sample: "foo","bar, baz" The query COPY sample FROM '/tmp/sample.csv' USING DELIMITERS ','; expected throws ERROR: extra data after last expected column CONTEXT: COPY sample, line 1: ""foo","bar, baz"" But, well, CSV parsing is not a rocket science and I would wonder if it is not possible to solve without reformatting the