title: postgreSQL - Import CSV, but there are commas in the columns
body: <p>I am using postgreSQL version 13.0.1. (I have to use postgre)</p>
  <p><strong>Table Structure</strong></p>
  <pre><code>CREATE TABLE public.orders
  (
      key integer NOT NULL,
      skey integer NOT NULL,
      status character(1) COLLATE pg_catalog.&quot;default&quot; NOT NULL,
      price numeric(15,2) NOT NULL,
      date date NOT NULL,
      priority character(15) COLLATE pg_catalog.&quot;default&quot; NOT NULL,
      man character(15) COLLATE pg_catalog.&quot;default&quot; NOT NULL,
      priority2 integer NOT NULL,
      comment character varying(79) COLLATE pg_catalog.&quot;default&quot; NOT NULL
  )
  
  TABLESPACE pg_default;
  
  ALTER TABLE public.orders
      OWNER to postgres;
  </code></pre>
  <p><strong>CSV File contents</strong>.
  the first line is the header, the second line is data:</p>
  <pre><code>key ,skey,  status , price , date       ,priority2        ,man,             priority   ,comment
  1   ,2   ,  3      , 45.33 , 1992-02-21 ,4-NOT SPECIFIED  ,man#000000058  , 0          ,ggle. so, whatever you say.
  </code></pre>
  <p><strong>My Query</strong></p>
  <pre><code>COPY public.orders FROM 'D:\orders.csv' WITH (format csv,Header);
  </code></pre>
  <p><strong>The Error:</strong></p>
  <pre><code>ERROR:  extra data after last expected column
  CONTEXT:  COPY orders, line 3: &quot;1,2,3,45.33,1992-02-21,4-NOT SPECIFIED,man#000000058,0,ggle. so, whatever you say.
  &quot;
  SQL state: 22P04
  </code></pre>
  <p>Error is probably due to the last column that has a string (ggle. so, whatever you say.) with no &quot; &quot; to demark it as a string. It also has a comma in it.</p>
  <p>My desired output is to have the query complete successfully with the last column read as a whole string.
  I am also not allowed to change the data in the file.</p>
  <p>I have tried advice from these links:
  <br/>
  <a href="https://stackoverflow.com/questions/10001651/importing-csv-and-commas-in-string-values">Importing CSV and commas in string values</a>
  <br/>
  <a href="https://www.postgresql.org/docs/13/sql-copy.html" rel="nofollow noreferrer">https://www.postgresql.org/docs/13/sql-copy.html</a></p>
  <p>but I still ended up with the query and error as mentioned above. Please enlighten me.</p>