Re: [HACKERS] non-SQL C interface ? (fwd)

Поиск
Список
Период
Сортировка
От Jan Vicherek
Тема Re: [HACKERS] non-SQL C interface ? (fwd)
Дата
Msg-id Pine.LNX.3.96.980118132825.5201C-100000@ann.ied.com
обсуждение исходный текст
Ответ на Re: [HACKERS] non-SQL C interface ? (fwd)  (Peter T Mount <psqlhack@maidast.demon.co.uk>)
Список pgsql-hackers
On Sun, 18 Jan 1998, Peter T Mount wrote:

> >   basically I'm using only one table at a time, and I need only a few
> > simple operations on tuples (find,  add, updates, delete).
> >
> >  Can sombody advise me how could I get this simple interface ?
>
> 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.

  It seems like a  bit of overkill, since this would still have to go
through the SQL parser,optimizer,executor,etc. If I want to access the
tables only one at a time, and only load the rows into a simple C
structure, it seems like there has to be this interface, since the SQL
executor has to get to the data somehow too. And I thought it would be
through this C interface that I'm looking for.

 here goes the list of simple few calls I  need :
open db
select fields to work with
select index to use
select a record
update a record
add  a record
delete a record
lock a table against updates, unlock

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

  but libpq and do *only* SQL calls only, right ? Or can libpq do some of
these lower-level stuff too? that would be excellent !

      Thanx,

          Jan

 -- Gospel of Jesus is the saving power of God for all who believe --
Jan Vicherek ## To some, nothing is impossible. ##  www.ied.com/~honza
    >>>    Free Software Union President  ...  www.fslu.org    <<<
Interactive Electronic Design Inc.    -#-    PGP: finger honza@ied.com


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter T Mount
Дата:
Сообщение: Re: [HACKERS] PSQL man page patch
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] PSQL man page patch