populating a table via the COPY command using C code.

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

> 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.
>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jon Lapham 2005-04-27 17:54:09 restarting after power outage
Previous Message Typing80wpm 2005-04-27 17:12:34 Thanks for Rekall link!