Re: ECPG multiple INSERTS or SELECTS in one command?
От | Michael Meskes |
---|---|
Тема | Re: ECPG multiple INSERTS or SELECTS in one command? |
Дата | |
Msg-id | 20040521135618.GD14285@1 обсуждение исходный текст |
Ответ на | ECPG multiple INSERTS or SELECTS in one command? (<wespvp@syntegra.com>) |
Ответы |
Re: ECPG multiple INSERTS or SELECTS in one command?
|
Список | pgsql-interfaces |
On Sun, May 09, 2004 at 06:36:44PM -0500, wespvp@syntegra.com wrote: > A (different) Pro*C program I recently ported from Oracle to PostgreSQL > showed this difference. In Pro*C you can load an array with rows to insert, > then issue a single INSERT request passing it the array. I believe the same > thing applies to FETCH. As far as I can tell, in PostgreSQL ecpg (or other) > you have to execute one request per record. The program SEGV'd all over the > place when I tried to use the Pro*C array code. I had to do a major rework > of the code to remove the array logic. That is for insert right? Batching inserts is tricky as there is no way for ecpg to see if your array of 10 ints shall be inserted as 10 ints or as one array. With fetch on the other hand it should work the same as with Pro*C. There is no problem to fetch into an array. Michael -- Michael Meskes Email: Michael at Fam-Meskes dot De ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
В списке pgsql-interfaces по дате отправления: