Re: Array of C integers to temporary table?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Array of C integers to temporary table?
Дата
Msg-id 21370.1233084962@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Array of C integers to temporary table?  (postgres-novice@coreland.ath.cx)
Ответы Re: Array of C integers to temporary table?  (postgres-novice@coreland.ath.cx)
Список pgsql-novice
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.)

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.

            regards, tom lane

В списке pgsql-novice по дате отправления:

Предыдущее
От: postgres-novice@coreland.ath.cx
Дата:
Сообщение: Array of C integers to temporary table?
Следующее
От: "Obe, Regina"
Дата:
Сообщение: Re: Array of C integers to temporary table?