Inseting multiple rows at onece.

From: Steve <steve(at)zeropps(dot)uklinux(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Inseting multiple rows at onece.
Date: 2001-10-19 23:02:11
Message-ID: 3BD0B0F3.39A9CBB3@zeropps.uklinux.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

I've got a table that has two columns in it one is a
sequence and the second is
a inet unique, and I want to add multiple rows all at once
rather than issuing
the insert comand two thousand times.

Even when trying manually I can't get it to accept two rows
at once, I've tried
things like:

INSERT INTO ip_list (ip_address) VALUES ('212.1.136.246',
'212.1.156.23');

and

INSERT INTO ip_list (ip_address) VALUES ('212.1.136.246'),
('212.1.156.23');

but just get parse errors. It's fine inserting one row at a
time.

Using perl using the Pg module is there a way of adding a
whole array where each
element will go into a seperate row.

Any help greatly received.

--
Cheers
Steve email mailto:steve(at)zeropps(dot)uklinux(dot)net

%HAV-A-NICEDAY Error not enough coffee 0 pps.

web http://www.zeropps.uklinux.net/

or http://start.at/zero-pps

12:22pm up 124 days, 13:12, 2 users, load average: 1.00,
1.00, 1.00

Responses

Browse pgsql-general by date

  From Date Subject
Next Message G.L. Grobe 2001-10-20 00:32:53 help w/ query
Previous Message Lamar Owen 2001-10-19 22:01:39 Re: Upgrade