Thread: copy with libpq?

copy with libpq?

From
Jerome Raupach
Date:
I want to use copy ( file -> db ) with a command in C.
How do i?
Thanks.

Re: copy with libpq?

From
Holger Klawitter
Date:
Jerome Raupach wrote:
>
> I want to use copy ( file -> db ) with a command in C.
> How do i?

The easiest (albeit dirty) way is probably a call to
    system( "psql ..." )

But you can also call libpq directly. Documentation is
available in /path/to/postgres/doc/programmer (chapter 17 deals
with libpq)

HTH,
    Holger Klawitter
--
Holger Klawitter                                    +49 (0)251 484 0637
holger@klawitter.de                            http://www.klawitter.de/