[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Talking to Postgres from C



On Mon, Feb 2, 2009 at 8:57 AM, beamends <..hidden..> wrote:
> Hi All,
> not strictly LSMB, but does anyone have a pointer to a primer for
> reading and writing to Postgres/LSMB from C - I'm looking to update
> prices from suppliers CSV files and can't get my head round SQL at all
> I'm affraid.

What exactly are you trying to do?  The db speaks "SQL" to most client
programs, so if you are trying to write a libpq client, you wil still
be tied to SQL.

If OTOH, you are trying to write a stored proc in C using an interface
called "SPI" you might be able to get around some of the SQL, but not
all.

I would be more than happy to provide some services to you in this
area, however it would probably be in Perl and SQL.  In your case, I
would suggest that you look into using temporary tables and holding
tables.  This can often simplify the SQL quite a bit.

Best Wishes,
Chris Travers