Skip site navigation (1) Skip section navigation (2)

Re: Bulk updates/inserts

From: Shelby Cain <alyandon(at)yahoo(dot)com>
To: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Bulk updates/inserts
Date: 2004-04-15 04:23:42
Message-ID: 20040415042342.78626.qmail@web41608.mail.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
--- Christoph Haller <ch(at)rodos(dot)fzk(dot)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

In response to

pgsql-interfaces by date

Next:From: Nicolas AddingtonDate: 2004-04-16 02:35:41
Subject: pl/perl and dynaloader
Previous:From: Christoph HallerDate: 2004-04-14 14:51:31
Subject: Re: Bulk updates/inserts

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group