Re: continuous data from stdin

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: continuous data from stdin
Дата
Msg-id 1045810806.583.469.camel@tokyo
обсуждение исходный текст
Ответ на Re: continuous data from stdin  (Jeff Boes <jboes@nexcerpt.com>)
Список pgsql-general
On Tue, 2003-02-18 at 13:34, Jeff Boes wrote:
> I think you're going to have to write a program (Perl using DBI would be
> my choice) to use this output as input, and do INSERT statements as each
> record is received.  (The COPY command in SQL won't do the trick, if
> that's what you're thinking of.)

Actually, COPY should work fine, AFAICS. Write a client app to open a
connection to PostgreSQL, execute "COPY xxx FROM stdin;", and then push
lines of COPY input over the wire to PostgreSQL using PQputline(), and
end the COPY using PQendcopy().

That assumes you're using libpq -- other interfaces should provide a
similar way to do the same thing.

Cheers,

Neil
--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC




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

Предыдущее
От: Dennis Gearon
Дата:
Сообщение: Re: Bit string storage space?
Следующее
От: Tony Grant
Дата:
Сообщение: Re: Backend often crashing