Array of C integers to temporary table?

Поиск
Список
Период
Сортировка
От postgres-novice@coreland.ath.cx
Тема Array of C integers to temporary table?
Дата
Msg-id 20090127130442.GA58365@logik.internal.network
обсуждение исходный текст
Ответы 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>)
Список 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 по дате отправления:

Предыдущее
От: "Lukas"
Дата:
Сообщение: Re: Select START and MAXVALUE from Sequence
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Array of C integers to temporary table?