Received: from pimout2-int.prodigy.net (pimout2-ext.prodigy.net [207.115.63.101]) by postgresql.org (Postfix) with ESMTP id 816994758DA for ; Thu, 25 Apr 2002 20:37:51 -0400 (EDT) Received: from svilen (adsl-63-206-117-117.dsl.snfc21.pacbell.net [63.206.117.117]) by pimout2-int.prodigy.net (8.11.0/8.11.0) with ESMTP id g3Q0bmh212070; Thu, 25 Apr 2002 20:37:49 -0400 Message-Id: <200204260037.g3Q0bmh212070@pimout2-int.prodigy.net> From: svilen@iname.com To: "Duncan Adams (DNS)" Date: Thu, 25 Apr 2002 17:39:53 -0700 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: copy command Reply-To: svilen@iname.com Cc: postgres sql list In-reply-to: <7DD34E6DF5CD1B4283DDAB96A855DCED2F3285@vodabemail1.vodacom.co.za> X-mailer: Pegasus Mail for Win32 (v3.12b) X-Archive-Number: 200204/316 X-Sequence-Number: 7580 Hello! You only need to put an "\" in front of "copy". It is an internal command. And you don't need ";" at the end it would be: bpsimple=# \copy dns_ip from 'dns.txt' \. bpsimple=# SELECT * FROM dns_ip; dns | ip ---------+--------------- aeomc04 | 10.121.4.157 somcmd1 | 10.121.23.57 aeomc05 | 10.121.4.162 gsmomc6 | 10.121.4.154 (4 rows) \. is the response and tells you that it worked. I actually tried it with "\copy dns_ip from dns.txt", without the quotes and it also worked perfectly. Svilen Dyakovski On 25 Apr 02, at 16:53, Duncan Adams (DNS) wrote: > > wire_dev=> copy dns_ip from dns.txt > wire_dev-> ; > ERROR: parser: parse error at or near "dns" > wire_dev=> copy dns_ip from /database/pgsql/dns.txt > wire_dev-> ; > ERROR: parser: parse error at or near "/" > wire_dev=> > wire_dev=> \d dns_ip > Table "dns_ip" > Attribute | Type | Modifier > -----------+-----------------------+---------- > dns | character varying(32) | > ip | character varying(32) | >