copy

From: Clifton Zama <csz(at)jhb(dot)ucs(dot)co(dot)za>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: copy
Date: 2006-02-01 12:03:10
Message-ID: 200602011403.10801.csz@jhb.ucs.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Please help.

 Please correct :  copy tmp_table from supplier_merch.dat with delimiter '|';

ERROR:  parser: parse error at or near "table" at character 6.

COPY table [ ( column [, ...] ) ]
    FROM { 'filename' | stdin }
    [ [ WITH ]
          [ BINARY ]
          [ OIDS ]
          [ DELIMITER [ AS ] 'delimiter' ]
          [ NULL [ AS ] 'null string' ] ]
COPY table [ ( column [, ...] ) ]
    TO { 'filename' | stdout }
    [ [ WITH ]
          [ BINARY ]
          [ OIDS ]
          [ DELIMITER [ AS ] 'delimiter' ]
          [ NULL [ AS ] 'null string' ] ]

.  

I assume table stands for table name, and all the stuff in [] is optional.

I tried working this out at home, which is when I first learnt of it and
couldn't get it to work. I had to use some psql command equivalent which I
cannot remember correctly anymore, and cannot find in
"/usr/local/pgsql/bin/".

I don't know if it only exist in 8.0.

Responses

  • Re: copy at 2006-01-31 15:00:26 from Tom Lane
  • Re: copy at 2006-02-01 06:45:12 from Christoph Della Valle

Browse pgsql-novice by date

  From Date Subject
Next Message Ketema Harris 2006-02-01 16:00:56 How To Return a Row or Result Set
Previous Message Dyanesh NagarajaRao 2006-02-01 11:00:54 Postgres Installation problem.