Re: Implementing Frontend/Backend Protocol TCP/IP - Mailing list pgsql-general

From Craig Ringer
Subject Re: Implementing Frontend/Backend Protocol TCP/IP
Date
Msg-id 1256620221.1709.18.camel@wallace.localnet
Whole thread Raw
In response to Re: Implementing Frontend/Backend Protocol TCP/IP  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-general
On Mon, 2009-10-26 at 20:15 -0300, Alvaro Herrera wrote:
Raimon Fernandez wrote:
> 
> 
> Hello,
> 
> 
> I'm trying to implement the front-end protocol with TCP from
> REALbasic to PostgreSQL.

That sounds the most difficult way to do it.  Can't you just embed
libpq?

+1

Almost all languages support some kind of C bindings or provide a dlopen-like mechanism to dynamically call C functions from shared libraries.

RealBasic appears to have fairly dynamic, dlopen-style bindings. I'm sure you can find more information in the manual, but here's an example of some syntax:

http://forums.realsoftware.com/viewtopic.php?t=5050

You'll have to do a bit more work to produce bindings for libpq, though, especially if you have to produce bindings for any data types (C structures). If all you have to bind is function calls, and you can handle any libpq-specific structures as opaque void pointers then it shouldn't be too hard to just bind the function calls you need.

--
Craig Ringer

pgsql-general by date:

Previous
From: 纪晓曦
Date:
Subject: How does PostgreSQL recognise "deleted" tuples by using xmax ?
Next
From: Craig Ringer
Date:
Subject: Re: Is there any ways to pass an array as parameter in libpq?