Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id AAA48651 for ; Sun, 21 May 2000 00:54:30 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id AAA26979; Sun, 21 May 2000 00:54:17 -0400 (EDT) To: "Stuart Grimshaw" cc: "Postgres-SQL" Subject: Re: Adding many rows to a table. In-reply-to: <004101bfc2a5$e6a18280$0200000a@home.stubbynet.org.uk> References: <004101bfc2a5$e6a18280$0200000a@home.stubbynet.org.uk> Comments: In-reply-to "Stuart Grimshaw" message dated "Sat, 20 May 2000 22:53:57 +0100" Date: Sun, 21 May 2000 00:54:17 -0400 Message-ID: <26976.958884857@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200005/91 "Stuart Grimshaw" writes: > The docs suggest using "copy to" for inserting lots of data. I created a > string : > COPY TO keywords FROM STDIN USING DELIMITERS ','; > 520,cheese > 520,bread > 521,pickle > 522,spam > \. > and then executed it, and got the following error > ERROR: parser: parse error at or near "520" > So my question is, after all that, is that the right way to construct my > string (regardless of language, Perl C/C++ etc) That does work as a psql script. In other client interfaces you might need to submit the COPY data separately from the initial COPY command. Hard to say more without knowing exactly what you tried with which interface ... regards, tom lane