Re: newbie sql question...

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Jason Ziegler <moo(at)zigfam(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: newbie sql question...
Date: 2003-05-27 16:32:43
Message-ID: 20030527163243.GA27553@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, May 27, 2003 at 00:07:48 -0500,
Jason Ziegler <moo(at)zigfam(dot)org> wrote:
> Hello folks, I'm new to this list, and have been putting up with mysql
> for too long, so please forgive me for asking such a newbie question as
> this:
>
> I have a query that works in mysql:
> "INSERT INTO table1 ( id, column2, column3 ) VALUES ( '1', 'text
> stuff', 'text stuff' ), ( '2', 'more text', 'even more text')"

It is possible to do more than one insert in a single statment. You
can build a select list using a union between the rows being added
and use the insert from a select to load the data. I suspect that
this won't work well for really long lists. I don't know that it is
any faster than using multiple inserts in a single transaction.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2003-05-27 17:07:10 Re: Postgresql on SUN Server
Previous Message Damien 2003-05-27 16:24:40 Re: speed w/ OFFSET/LIMIT