Re: [GENERAL] Postgresql's "copy tablefrom STDIN" and DBD-Pg.

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [GENERAL] Postgresql's "copy tablefrom STDIN" and DBD-Pg.
Дата
Msg-id Pine.LNX.4.20.9911292226160.658-100000@localhost.localdomain
обсуждение исходный текст
Ответ на Postgresql's "copy tablefrom STDIN" and DBD-Pg.  (Rodney McDuff <ccmcduff@its.uq.edu.au>)
Список pgsql-general
Since COPY is PostgreSQL specific and DBD/DBI is supposed to be generic, I
don't think there's an easy way and you wouldn't be doing yourselves any
favours anyway.

If you insist on using COPY then you can use our native "Pg" Perl module,
which has functions equivalent to libpq's getline() and putline(), which
are necessary to handle COPY input and output. In the psql source code
(src/bin/psql/*.c) there are two functions called handleCopy{In|Out} that
handle this correctly, but I suspect in Perl it might be a lot easier
since you don't have to worry about memory allocation.

Good luck.

    -Peter

On 1999-11-29, Rodney McDuff mentioned:

> Hi
>     Is there a way of using postgresql's "copy table from STDIN"
> with DBD-Pg.
>
>

--
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] memory
Следующее
От: "John Henderson"
Дата:
Сообщение: memory