Re: Array of C integers to temporary table? - Mailing list pgsql-novice

From postgres-novice@coreland.ath.cx
Subject Re: Array of C integers to temporary table?
Date
Msg-id 20090127204425.GA89472@logik.internal.network
Whole thread Raw
In response to Re: Array of C integers to temporary table?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
On 2009-01-27 14:36:02, Tom Lane wrote:
> postgres-novice@coreland.ath.cx writes:
> > What's the "correct" (read: simple, efficient) way to
> > pass an arbitrarily sized array of C integers to postgres
> > and have it turned into a temporary table?
>
> > I'm using PostgreSQL 7.4.
>
> Well, the first thing to do is update to a non-dinosaurian version ;-).
> Then you could use multi-row INSERT ... VALUES.  (The list of other
> benefits is far too long to enumerate here, but I'll just mention that
> 7.4 is going to stop being maintained any day now.)

I agree absolutely. Unfortunately I don't actually control the database
in question, I'm just a "guest" on it...

> An alternative that should work on 7.x is to use COPY FROM STDIN,
> but it's not really "simple" from a coding standpoint.  See the libpq
> COPY-support functions.

Ok, thanks.

pgsql-novice by date:

Previous
From: "Obe, Regina"
Date:
Subject: Re: Array of C integers to temporary table?
Next
From: postgres-novice@coreland.ath.cx
Date:
Subject: Re: Array of C integers to temporary table?