title: Why does Psycopg provide `cursor`'s methods (`copy_to()`, `copy_from()`), instead of calling `cursor.execute()` to send a `COPY` command?
body: <p>From <a href="http://initd.org/psycopg/docs/usage.html#using-copy-to-and-copy-from" rel="nofollow noreferrer">http://initd.org/psycopg/docs/usage.html#using-copy-to-and-copy-from</a></p>
  
  <blockquote>
    <p>Psycopg <code>cursor</code> objects provide an interface (<code>copy_to()</code>, <code>copy_from()</code>, <code>copy_expert()</code>) to the efficient PostgreSQL <code>COPY</code> command to move data from files to tables and back.
    Currently  no  adaptation  is  provided  between  Python  and  PostgreSQL  types  on <code>COPY</code>:
    the file can be any Python file-like object but its format must be in the format accepted by
    PostgreSQL <code>COPY</code> command (data format, escaped characters, etc).</p>
  </blockquote>
  
  <p><code>cursor.execute()</code> can send a command as a string to PostgreSQL server to execute. So why does Psycopg   provide <code>cursor</code>'s methods  (<code>copy_to()</code>, <code>copy_from()</code>, <code>copy_expert()</code>),  instead of calling <code>cursor.execute()</code> to send a <code>COPY</code> command as a string to PostgreSQL server to execute?</p>
  
  <p>Thanks.</p>