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

From postgres-novice@coreland.ath.cx
Subject Array of C integers to temporary table?
Date
Msg-id 20090127130442.GA58365@logik.internal.network
Whole thread Raw
Responses Re: Array of C integers to temporary table?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Array of C integers to temporary table?  ("Obe, Regina" <robe.dnd@cityofboston.gov>)
List pgsql-novice
Hello.

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.

I could, of course, turn the array into a long list of
insert statements:

  BEGIN;
  CREATE TEMPORARY TABLE temp_table (id integer) ON COMMIT DROP;
  INSERT INTO temp_table VALUES (1);
  INSERT INTO temp_table VALUES (23);
  INSERT INTO temp_table VALUES (3889);
  ...

But that seems long winded and rather inefficient.

Any help appreciated!


pgsql-novice by date:

Previous
From: "Lukas"
Date:
Subject: Re: Select START and MAXVALUE from Sequence
Next
From: Tom Lane
Date:
Subject: Re: Array of C integers to temporary table?