X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 0FD4D475CCE for ; Mon, 3 Mar 2003 12:05:57 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 49952-01 for ; Mon, 3 Mar 2003 12:05:54 -0500 (EST) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 982DE475D6E for ; Mon, 3 Mar 2003 12:01:42 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id 7A38E43B056; Mon, 3 Mar 2003 12:01:42 -0500 (EST) From: saintxplo@yahoo.com.ar (Saint X) X-Newsgroups: comp.databases.postgresql.sql Subject: Insert multiple Rows Date: 3 Mar 2003 08:38:20 -0800 Organization: http://groups.google.com/ Lines: 24 Message-ID: <6f079210.0303030838.21f184af@posting.google.com> Content-Type: text/plain; charset=ISO-8859-1 X-Complaints-To: groups-abuse@google.com To: pgsql-sql@postgresql.org Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new X-Archive-Number: 200303/78 X-Sequence-Number: 12118 Hi, I have a program that need to send a Postgresql database a lot of rows, i'm doing it using FOR an INSERT, something like this for i =3D 0 to 1000 { insert into table(item1) VALUES (i); } And so on, as you can imagine these consume a lot of resources and move so slowly, that's why I'm looking for a command to send more than one row at the time, something like insert into table (item1) values ('1' / '2' / '3' / '4' ... / '1000'); The data I want to send come from variables on the program, coping local variables is fast so i can make my query on a variable with all the data and then send just one query to the database. I was looking on PostgreSQL documentation and find nothing,, I think that what I'm looking for doesn't exist,, you are my last resource, it possible to do what I want? BTW: I found a command on Postgre to pass a file with all the info but the database is not on local machine and its a little hard to send it a file.