Re: Implementing Frontend/Backend Protocol TCP/IP

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Raimon Fernandez <coder(at)montx(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Implementing Frontend/Backend Protocol TCP/IP
Date: 2009-10-27 14:07:27
Message-ID: b42b73150910270707n62fdd776x11dae4f0e3c48b43@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces

On Mon, Oct 26, 2009 at 7:17 PM, John R Pierce <pierce(at)hogranch(dot)com> wrote:
> Alvaro Herrera wrote:
>>>
>>> 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?
>>
>
> yah, seriously.   the binary protocol is not considered stable, it can
> change in subtle ways in each version.  libpq handles the current version
> and all previous versions, and exposes all methods.

small clarification:

There is only one protocol and it is binary. For example the length
of datums is never sent as a string. The protocol is quite
stable...it hasn't changed since 7.4 and there hasn't really been a
big call (some of the quite interesting comments in this thread aside)
for it to change IMO.

The protocol has a binary or text mode, so that user data can be
sent/received in text or binary. Using the binary mode is not stable,
which is what I think you were basically saying.

Now, (self serving pitch here) if you use libpqtypes, you get all the
benefits of binary protocol mode (performance, easy data marshaling)
without having to worry about data format changes between versions
:-D.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message JC Praud 2009-10-27 14:15:22 auto truncate/vacuum full
Previous Message Alvaro Herrera 2009-10-27 14:06:57 Re: Implementing Frontend/Backend Protocol TCP/IP

Browse pgsql-interfaces by date

  From Date Subject
Next Message Raimon Fernandez 2009-10-27 14:43:20 Re: Implementing Frontend/Backend Protocol TCP/IP
Previous Message Alvaro Herrera 2009-10-27 14:06:57 Re: Implementing Frontend/Backend Protocol TCP/IP