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

From Merlin Moncure
Subject Re: Implementing Frontend/Backend Protocol TCP/IP
Date
Msg-id b42b73150910270707n62fdd776x11dae4f0e3c48b43@mail.gmail.com
Whole thread Raw
In response to Re: Implementing Frontend/Backend Protocol TCP/IP  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
On Mon, Oct 26, 2009 at 7:17 PM, John R Pierce <pierce@hogranch.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

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Implementing Frontend/Backend Protocol TCP/IP
Next
From: JC Praud
Date:
Subject: auto truncate/vacuum full