Received: from mel-rto7.wanadoo.fr (smtp-out-7.wanadoo.fr [193.252.19.26]) by postgresql.org (Postfix) with ESMTP id A0860476075 for ; Thu, 25 Apr 2002 14:34:19 -0400 (EDT) Received: from mel-rta9.wanadoo.fr (193.252.19.69) by mel-rto7.wanadoo.fr; 25 Apr 2002 20:34:19 +0200 Received: from linux03.arp.homelinux.org (80.13.32.44) by mel-rta9.wanadoo.fr (6.5.007) id 3CC5604F001418AF; Thu, 25 Apr 2002 20:34:19 +0200 Received: from windows01 (apere.arp.homelinux.org [192.168.0.1]) by linux03.arp.homelinux.org (Postfix) with SMTP id 226F513B24; Thu, 25 Apr 2002 20:34:18 +0200 (CEST) Message-ID: <008401c1ec87$ced6ac80$0100a8c0@arp.homelinux.org> From: "ARP" To: "Duncan Adams (DNS)" , "postgres sql list" References: <7DD34E6DF5CD1B4283DDAB96A855DCED2F3285@vodabemail1.vodacom.co.za> Subject: Re: copy command Date: Thu, 25 Apr 2002 20:34:09 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Archive-Number: 200204/314 X-Sequence-Number: 7578 I think you need the quote around the file name since it's not a keyword an= d it's text. Then your dns.txt file needs to be formated correctly, especially concernin= g the separator : by default I think TABs are used and \N is used to say NU= LL. You can go aver that with USING DELIMITERS ';' for example and WITH NUL= L AS '' if your dns.txt look like this : aeomc04;10.121.4.157 somcmd1;10.121.23.57 aeomc05;10.121.4.162 gsmomc6;10.121.4.154 hope this helps Arnaud ----- Original Message -----=20 From: "Duncan Adams (DNS)" To: "postgres sql list" Sent: Thursday, April 25, 2002 4:53 PM Subject: [SQL] copy command hi all how do you use the copy command call me dumb, i have RTFM but i don't seem to get it. an exstract from my dns.txt file. aeomc04 10.121.4.157 somcmd1 10.121.23.57 aeomc05 10.121.4.162 gsmomc6 10.121.4.154 wire_dev=3D> copy dns_ip from dns.txt wire_dev-> ; ERROR: parser: parse error at or near "dns" wire_dev=3D> copy dns_ip from /database/pgsql/dns.txt wire_dev-> ; ERROR: parser: parse error at or near "/" wire_dev=3D> wire_dev=3D> \d dns_ip Table "dns_ip" Attribute | Type | Modifier -----------+-----------------------+---------- dns | character varying(32) | ip | character varying(32) | thanx ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly