title: copy data from csv to postgresql using python
body: <p>I am on windows 7 64 bit.
  I have a csv file 'data.csv'.
  I want to import data to a postgresql table 'temp_unicommerce_status' via a python script.</p>
  
  <p>My Script is:</p>
  
  <pre><code>import psycopg2
  conn = psycopg2.connect("host='localhost' port='5432' dbname='Ekodev' user='bn_openerp' password='fa05844d'")
  cur = conn.cursor()
  cur.execute("""truncate table "meta".temp_unicommerce_status;""")
  cur.execute("""Copy temp_unicommerce_status from 'C:\Users\n\Desktop\data.csv';""")
  conn.commit()
  conn.close()
  </code></pre>
  
  <p>I am getting this error</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\n\Documents\NetBeansProjects\Unicommerce_Status_Update\src\unicommerce_status_update.py", line 5, in &lt;module&gt;
  cur.execute("""Copy temp_unicommerce_status from     'C:\\Users\\n\\Desktop\\data.csv';""")
  psycopg2.ProgrammingError: must be superuser to COPY to or from a file
  HINT:  Anyone can COPY to stdout or from stdin. psql's \copy command also works for anyone.
  </code></pre>