title: ERROR: missing data for column when using COPY FROM PROGRAM in psql
body: <p>i'm trying to import the data from a cURL with the next command in psql:</p>
  <p><code>COPY testtable FROM PROGRAM 'curl https://.....'</code></p>
  <p>This is the data in the URL:</p>
  <blockquote>
  <p>[{&quot;date&quot;:&quot;20201006T120000Z&quot;,&quot;uri&quot;:&quot;secret&quot;,&quot;val&quot;:&quot;1765.756&quot;},{&quot;date&quot;:&quot;20201006T120500Z&quot;,&quot;uri&quot;:&quot;secret&quot;,&quot;val&quot;:&quot;2015.09258&quot;},{&quot;date&quot;:&quot;20201006T121000Z&quot;,&quot;uri&quot;:&quot;secret&quot;,&quot;val&quot;:&quot;2283.0885&quot;}]</p>
  </blockquote>
  <p>But psql returns</p>
  <blockquote>
  <p>ERROR: missing data for column &quot;uri&quot;</p>
  </blockquote>
  <p>I've tried copying it on tables with the columns as text and json format. Also tried adding <code>(DELIMITER ',')</code> but that returns</p>
  <blockquote>
  <p>ERROR: extra data after last expected column</p>
  </blockquote>
  <p>i feel like the problem could be caused from the &quot;[]&quot; in the start and the end of the data, but i im not sure.</p>
  <p>These are the definitions of the tables that i used.</p>
  <p>Table &quot;public.test_table&quot;</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Column</th>
  <th>Type</th>
  <th>Modifiers</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>date</td>
  <td>text</td>
  <td>not null</td>
  </tr>
  <tr>
  <td>uri</td>
  <td>text</td>
  <td></td>
  </tr>
  <tr>
  <td>val</td>
  <td>text</td>
  <td></td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Indexes:
  &quot;test_table_pkey&quot; PRIMARY KEY, btree (date)</p>
  <p>Table &quot;public.test_table2&quot;</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Column</th>
  <th>Type</th>
  <th>Modifiers</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>date</td>
  <td>json</td>
  <td></td>
  </tr>
  <tr>
  <td>uri</td>
  <td>json</td>
  <td></td>
  </tr>
  <tr>
  <td>val</td>
  <td>json</td>
  <td></td>
  </tr>
  </tbody>
  </table>
  </div>