agora inbox for pgsql-interfaces@postgresql.org  
help / color / mirror / Atom feed
From: Craig Ringer <craig@postnewspapers.com.au>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Raimon Fernandez <coder@montx.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Implementing Frontend/Backend Protocol TCP/IP
Date: Tue, 27 Oct 2009 13:10:21 +0800
Message-ID: <1256620221.1709.18.camel@wallace.localnet> (raw)
In-Reply-To: <20091026231516.GN8812@alvh.no-ip.org>
References: <92781008-8A70-42CE-A49B-6EE67103FACB@montx.com>
	<FC6CBC8C-A398-4835-B3A3-C16C6F4F62D9@pgedit.com>
	<E084987E-A212-4B70-8CFF-D83AA00629C5@montx.com>
	<C670629A-1E54-4F80-9497-6CCAC1A8BDC0@montx.com>
	<20091026231516.GN8812@alvh.no-ip.org>

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

view thread (20+ messages)  latest in thread

Message-ID: <1256620221.1709.18.camel@wallace.localnet>
Permalink:  ../1256620221.1709.18.camel@wallace.localnet/
Also on:    postgresql.org/message-id/1256620221.1709.18.camel@wallace.localnet

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: craig@postnewspapers.com.au, alvherre@commandprompt.com, coder@montx.com, pgsql-general@postgresql.org
  Subject: Re: Implementing Frontend/Backend Protocol TCP/IP
  In-Reply-To: <1256620221.1709.18.camel@wallace.localnet>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox