Re: Bulk updates/inserts - Mailing list pgsql-interfaces

From Shelby Cain
Subject Re: Bulk updates/inserts
Date
Msg-id 20040415042342.78626.qmail@web41608.mail.yahoo.com
Whole thread Raw
In response to Re: Bulk updates/inserts  (Christoph Haller <ch@rodos.fzk.de>)
List pgsql-interfaces
--- Christoph Haller <ch@rodos.fzk.de> wrote:
> 
> There is a way to use COPY programmatically via
> libpq: 
> 
> 
> PQexec("COPY xxx FROM stdin");
> for (...)
> {
>     sprintf(buf, "%d\t%d\t...\n",
>             values[0], values[1], ... values[n]);
>     PQputline(conn, buf);
> }
> PQputline(conn, "\\.\n");
> PQendcopy(conn);
> 
> Regards, Christoph 
> 

Excellent.  That'll help reduce my load times.  Thanks
for the help.

Regards,

Shelby Cain

    
__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html


pgsql-interfaces by date:

Previous
From: Christoph Haller
Date:
Subject: Re: Bulk updates/inserts
Next
From: "brian plummer"
Date:
Subject: PostgreSQL: libpq, win32 build