Re: insert with multiple targetLists
От | Rod Taylor |
---|---|
Тема | Re: insert with multiple targetLists |
Дата | |
Msg-id | 221201c1f16b$275a0450$ad02000a@jester обсуждение исходный текст |
Ответ на | insert with multiple targetLists (Neil Conway <nconway@klamath.dyndns.org>) |
Ответы |
Re: insert with multiple targetLists
|
Список | 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 по дате отправления: