populating a table via the COPY command using C code. - Mailing list pgsql-hackers

From Mak, Jason
Subject populating a table via the COPY command using C code.
Date
Msg-id 521ABD2E7DC4254D9633A530906212D5026A91@xcgny105.northgrum.com
Whole thread Raw
List pgsql-hackers
hi,

I'm writing an application in C that basically converts binary data into something meaningful.  My first attempt was to
parsethe binary and insert directly to the database in one step.  But this proved to be very slow.  So I decided to go
witha two step process.  The first step is to parse the data and create a flat file with tab delimited fields.  The
secondstep is to load this data using the COPY command.  I don't quite understand how this is done within C.  Can
someoneprovide me with some examples.  I've already done some searches on the internet.  the examples that I found
don'tmatch with I'm trying to do.  Please help! 

thanks,
jason.




pgsql-hackers by date:

Previous
From: Robert Treat
Date:
Subject: Re: Tablepartitioning: Will it be supported in Future?
Next
From: Gurmeet Manku
Date:
Subject: Re: [PERFORM] Bad n_distinct estimation; hacks suggested?