Re: insert with multiple targetLists - Mailing list pgsql-hackers

From Rod Taylor
Subject Re: insert with multiple targetLists
Date
Msg-id 221201c1f16b$275a0450$ad02000a@jester
Whole thread Raw
In response to insert with multiple targetLists  (Neil Conway <nconway@klamath.dyndns.org>)
Responses Re: insert with multiple targetLists  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
>     INSERT INTO t1 (c1) VALUES (1), (2);
>
>     would be executed in a similar fashion to:
>
>     INSERT INTO t1 (c1) VALUES (1);
>     INSERT INTO t1 (c1) VALUES (2);
>
> Does this sound reasonable?

I debated doing the above too.  In fact, I had a partial
implementation at one point.

However, the resulting purpose of allowing such a construct is to
enable the speeds copy achieves with the variation that is found in an
insert.  So, the above transformation method really doesn't accomplish
much except a new style for many inserts.   But it is quite a bit
easier simply to code each insert individually if there is a minimal
speed gain.  Large strings may reach query length limits in other
systems using this style (look at a MySQL dump sometime).  You're
really only good for about 50 or 60 records in a single insert
statement there.

I'd tend to run it like a copy that can resolving expressions and
defaults.



pgsql-hackers by date:

Previous
From: cbbrowne@cbbrowne.com
Date:
Subject: Re: PostgreSQL mission statement?
Next
From: David Terrell
Date:
Subject: Re: PostgreSQL mission statement?