Re: continuous data from stdin

Поиск
Список
Период
Сортировка
Искать
От
Neil Conway
Тема
Re: continuous data from stdin
Дата
Msg-id
1045810806.583.469.camel@tokyo
Ответ на
Список
Дерево обсуждения
Re: continuous data from stdin Harry Broomhall <harry.broomhall@uk.easynet.net>
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  || PGP Key ID: DB3C29FC



В списке pgsql-general по дате отправления
От: Dennis Gearon
Дата:
Сообщение: Re: Bit string storage space?
От: Tony Grant
Дата:
Сообщение: Re: Backend often crashing
FAQ