Re: How can I make multiple insertions ?

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: How can I make multiple insertions ?
Date: 2006-03-11 13:17:16
Message-ID: 20060311131716.GA23667@KanotixBox
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Miguel <migabolinux(at)yahoo(dot)com> schrieb:

> I have read that the only solution for insertions
> multiple in Postgres is using copy , please could
> somebody explains to me if exist another posibility .

Yes, of course ;-)

test=# create table foobar (x int, y int);
CREATE TABLE
test=# insert into foobar select 1,1 union select 2,2 union select 3,3;
INSERT 0 3
test=# select * from foobar ;
x | y
---+---
1 | 1
2 | 2
3 | 3
(3 rows)

HTH, Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknow)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Ronni 2006-03-11 19:26:21 Permissions to users ??? (FATAL: Ident authentication failed for user)
Previous Message Miguel 2006-03-11 13:06:18 How can I make multiple insertions ?