populating a table via the COPY command using C code.

From: "Mak, Jason" <jason(dot)mak(at)ngc(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: populating a table via the COPY command using C code.
Date: 2005-04-26 20:57:09
Message-ID: 521ABD2E7DC4254D9633A530906212D5026A91@xcgny105.northgrum.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi,

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

thanks,
jason.

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2005-04-26 21:02:31 Re: [HACKERS] Bad n_distinct estimation; hacks suggested?
Previous Message Robert Treat 2005-04-26 20:52:35 Re: Tablepartitioning: Will it be supported in Future?