Re: ECPG multiple INSERTS or SELECTS in one command?

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: wespvp(at)syntegra(dot)com
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: ECPG multiple INSERTS or SELECTS in one command?
Date: 2004-05-21 13:56:18
Message-ID: 20040521135618.GD14285@1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Sun, May 09, 2004 at 06:36:44PM -0500, wespvp(at)syntegra(dot)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(at)jabber(dot)org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message wespvp 2004-05-21 14:38:17 Re: ECPG multiple INSERTS or SELECTS in one command?
Previous Message Michael Meskes 2004-05-21 13:53:18 Re: Application compile file using Embeded SQL in Postgres4.7.2