X-Original-To: pgsql-interfaces@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id BB24C475AE5 for ; Thu, 10 Apr 2003 22:21:46 -0400 (EDT) Received: from localhost.localdomain (m066-156.nv.iinet.net.au [203.217.66.156]) by postgresql.org (Postfix) with ESMTP id 7EA1C474E42 for ; Thu, 10 Apr 2003 22:21:39 -0400 (EDT) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id h3B2LgWV003914 for ; Fri, 11 Apr 2003 12:21:42 +1000 Subject: Re: [HACKERS] More thoughts about FE/BE protocol From: Bruce Badger To: pgsql-interfaces@postgresql.org In-Reply-To: <7705.1050017370@sss.pgh.pa.us> References: <10478.1049927451@sss.pgh.pa.us> <3E95A3CD.9080500@xythos.com> <5564.1049998513@sss.pgh.pa.us> <1050012887.1063.12.camel@alice> <7705.1050017370@sss.pgh.pa.us> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 (1.0.8-11) Date: 11 Apr 2003 12:21:41 +1000 Message-Id: <1050027702.3103.59.camel@alice> Mime-Version: 1.0 X-Spam-Status: No, hits=-39.4 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, QUOTE_TWICE_1,REFERENCES,REPLY_WITH_QUOTES, USER_AGENT_XIMIAN autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/78 X-Sequence-Number: 4017 On Fri, 2003-04-11 at 09:29, Tom Lane wrote: > Bruce Badger writes: > > Is SYNC going to be a new kind of message? Is the SYNC response yet > > another? > > Yes; no. SYNC response already exists: it's ReadyForQuery (Z). > > > Either way, could this be used as a keep-alive for long-lived > > connections? (some users of the current Smalltalk drivers report that > > long lived connections over the Internet sometimes just die) > > If you're worried about that, Q with an empty query already suffices, > though SYNC will work too. > > I'd be inclined to think that such breakage isn't our problem though; > anyone suffering from it needs to fix their firewall timeouts ... Oh, I agree. But not everyone has control over the firewalls they have to work through, and not all admins have enough (any?) motivation to help. A keep-alive could be a useful option in an unhelpful world. > > Also, with the new protocol, will the number of affected rows be > > returned in a way that does not require parsing to fish it out? > > I'm not planning to change the contents of messages more than I have to. > What's so hard about parsing "UPDATE nnn" ? Nothing, of course. However the fewer easy things we *have* to do, the more other things we have time for. Also, some things that could return a row count don't, e.g. SELECT. And to turn the question around: What's so hard about adding in an Int32 in the 'C' (CompletedResponse) message which gives a row count? Then, if people want to display "UPDATE nnn", they can concatenate the string 'UPDATE' with the number - even easier than parsing - at least in Smalltalk :-) ... then, having a code to indicate the kind of thing completed (like the code used in the 'R' (AuthenticationXxx) messages means you could lose the string in the message altogether.