X-Original-To: pgsql-hackers@postgreSQL.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 086A54763B1; Tue, 13 May 2003 18:58:19 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 50DC3476348; Tue, 13 May 2003 18:58:18 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h4DMwIU6019128; Tue, 13 May 2003 18:58:18 -0400 (EDT) To: Peter Eisentraut Cc: pgsql-hackers@postgreSQL.org, pgsql-interfaces@postgreSQL.org Subject: Re: [INTERFACES] Last round (I think) of FE/BE protocol changes In-reply-to: References: Comments: In-reply-to Peter Eisentraut message dated "Wed, 14 May 2003 00:48:02 +0200" Date: Tue, 13 May 2003 18:58:18 -0400 Message-ID: <19127.1052866698@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-32.5 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/334 X-Sequence-Number: 38841 Peter Eisentraut writes: > I think the "future versions" in this are going to be making this choice a > datatype-specific session state. How can we make this transition > smoother? Maybe 0 can be default, 1 text, 2 binary? Why would a variable default be a good idea? The client *always* wants to know what format the data is being returned in; I can't imagine wanting a default that might be unknown to (any layer of) client software. One of the things that I think I have learned from this redesign is that hidden state variables that affect the low-level protocol are a bad idea. If we were to provide a changeable default format, I'd want it to be reported by ParameterStatus messages. But I don't really see the argument for providing it. You'd just have to clutter the client-side stack with mechanisms for finding out what the default is. That's about the same amount of grunge in the API as labeling data with the format code in the first place ... but it's a lot easier to shoot yourself in the foot by forgetting to handle it. regards, tom lane