Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2012

    Unanswered: copying from stdion to stdout

    Hallo ,

    I'm trying to copy a csv file from my computer to a server and it looks like this with JDBC

    sql.executeUpdate("copy table1(coloumn) FROM" +" 'C:/csv/table1.csv'  WITH DELIMITER ',' CSV HEADER");
    and I am getting this error

    ERROR:must be superuser to COPY to or from a file

    Now after looking in interent I've found that i need to copy it to stdin and from stdin to stdout and then to the table,
    but how i can do this in postregsql??
    i thought about something like this:

    can someone plz just write a little example??

    and another thing,
    I found that i can do this with \copy but this is not working cause im getting the EROOR: syntax error at or near "\"

    or should I just write it someway else??


  2. #2
    Join Date
    Jun 2012
    any tipps plz????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts