pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Meskes <meskes@postgresql.org>
To: wespvp@syntegra.com
Cc: pgsql-interfaces@postgresql.org
Subject: Re: ECPG multiple INSERTS or SELECTS in one command?
Date: Fri, 21 May 2004 15:56:18 +0200
Message-ID: <20040521135618.GD14285@1> (raw)
In-Reply-To: <BCC42ABC.81A2%wespvp@syntegra.com>
References: <BCC42ABC.81A2%wespvp@syntegra.com>

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!



view thread (3+ messages)  latest in thread

Message-ID: <20040521135618.GD14285@1>
Permalink:  ../20040521135618.GD14285@1/
Also on:    postgresql.org/message-id/20040521135618.GD14285@1

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: meskes@postgresql.org, wespvp@syntegra.com
  Subject: Re: ECPG multiple INSERTS or SELECTS in one command?
  In-Reply-To: <20040521135618.GD14285@1>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox