Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 979B16322EA for ; Tue, 27 Oct 2009 11:07:40 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 26069-07-4 for ; Tue, 27 Oct 2009 14:07:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pw0-f44.google.com (mail-pw0-f44.google.com [209.85.160.44]) by mail.postgresql.org (Postfix) with ESMTP id 57A5663441C for ; Tue, 27 Oct 2009 11:07:30 -0300 (ADT) Received: by pwj8 with SMTP id 8so99132pwj.3 for ; Tue, 27 Oct 2009 07:07:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=u0uhbzdRRUGsEWwO+BSNy2ytKXVCpyh7XaEr8ECGgSc=; b=la2JalxN/JGWGWEpiUeE7L7ITZrS7nNCBgNmfbzEF/iHOl8j+RhaELosvdDIDl+IxC 0dhI2oSJsv142mP0G6r8SR30SQHFPSpMpMFa/SVHkTvZIdH4V30qQSCj8LN7RgZGLTaj JWITMmsrNSvPOiJEbU6VEAk7K0mBU683DiuIs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=AcQWxogqrT94LZqjE3H0hjQcUrniLYKcKrLD+jjSmo6T0FtxGtsrb4iWeKF4e66XVg Yk5EaiNh8lpB/B1jZ7/HFDPcoJHvKz3YplLCcPv87nsm2IidlDbSk0J4J17adAXT3U+t Tl0OjSpDLcUAHapWSS70uDoPvuxSFqejNCNI0= MIME-Version: 1.0 Received: by 10.115.38.30 with SMTP id q30mr9993463waj.184.1256652447640; Tue, 27 Oct 2009 07:07:27 -0700 (PDT) In-Reply-To: <4AE62E21.7040600@hogranch.com> References: <92781008-8A70-42CE-A49B-6EE67103FACB@montx.com> <20091026231516.GN8812@alvh.no-ip.org> <4AE62E21.7040600@hogranch.com> Date: Tue, 27 Oct 2009 10:07:27 -0400 Message-ID: Subject: Re: Implementing Frontend/Backend Protocol TCP/IP From: Merlin Moncure To: John R Pierce Cc: Alvaro Herrera , Raimon Fernandez , pgsql-general@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200910/1040 X-Sequence-Number: 154734 On Mon, Oct 26, 2009 at 7:17 PM, John R Pierce 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. =A0Can't you just embed >> libpq? >> > > yah, seriously. =A0 the binary protocol is not considered stable, it can > change in subtle ways in each version. =A0libpq handles the current versi= on > 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