Thread: How can I make multiple insertions ?

How can I make multiple insertions ?

From
Miguel
Date:
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 .
Thanks

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
Regístrate ya - http://correo.espanol.yahoo.com/

Re: How can I make multiple insertions ?

From
Andreas Kretschmer
Date:
Miguel <migabolinux@yahoo.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°