Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group