Re: newbie sql question... - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: newbie sql question...
Date
Msg-id 20030527163243.GA27553@wolff.to
Whole thread Raw
In response to newbie sql question...  (Jason Ziegler <moo@zigfam.org>)
List pgsql-general
On Tue, May 27, 2003 at 00:07:48 -0500,
  Jason Ziegler <moo@zigfam.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.

pgsql-general by date:

Previous
From: Damien
Date:
Subject: Re: speed w/ OFFSET/LIMIT
Next
From: Andrew Sullivan
Date:
Subject: Re: Postgresql on SUN Server