Re: [HACKERS] non-SQL C interface ? (fwd) - Mailing list pgsql-hackers

From Peter T Mount
Subject Re: [HACKERS] non-SQL C interface ? (fwd)
Date
Msg-id Pine.LNX.3.95.980118112949.11495B-100000@maidast
Whole thread Raw
In response to non-SQL C interface ? (fwd)  (Jan Vicherek <honza@ied.com>)
Responses Re: [HACKERS] non-SQL C interface ? (fwd)
List pgsql-hackers
On Sun, 18 Jan 1998, Jan Vicherek wrote:
>   Hi,
>
>  I  got no answer from pgsql-questions   list.

I saw this there, but was knee deep in code at the time

>   basically I'm using only one table at a time, and I need only a few
> simple operations on tuples (find,  add, updates, delete).
>
>   -- after a  quick look at all `cd src;  find .  -name '*.h'` I didn't
> find any such similar interface.
>
>  Can sombody advise me how could I get this simple interface ?
>
>  I'm fluent in C/C++.

I think the simplest way of doing this is to write your own stubs, that
then sit on top of libpq. This is the way I've done this in the past.

[snip]

>  and that's it. (Taken from Informinx 3.3, "ALL-II" C interface.)
>
>  We are looking into porting an app written for this Informix interface
> into Postgres, and I would wrinte a library simulating these calls.
>
>   Is there a set of calls seomwhere inside of PGSQL that I could use in my
> simulation library to utilize ?

As your trying to simulate another api, and it looked like it's fairly
simple, then it should be simple to do this, leaving libpq to do the
actual network stuff to the database.

--
Peter T Mount  petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk


pgsql-hackers by date:

Previous
From: "Vadim B. Mikheev"
Date:
Subject: Re: [HACKERS] PSQL man page patch
Next
From: Peter T Mount
Date:
Subject: Re: [HACKERS] PSQL man page patch