Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T2IKa-0002jb-Pn for pgsql-docs@postgresql.org; Fri, 17 Aug 2012 08:55:00 +0000 Received: from mail-lpp01m010-f46.google.com ([209.85.215.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T2IKY-0002xq-3a for pgsql-docs@postgresql.org; Fri, 17 Aug 2012 08:54:59 +0000 Received: by lagy9 with SMTP id y9so1972886lag.19 for ; Fri, 17 Aug 2012 01:54:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=k6hmPUCdJcsRSYM3k+bQnft0szxZVf7tMkGEKRpKkP0=; b=kUHkfrp1eXu09QpwFRIe9w19CwkZbvPKDXqqwY1irDrI9kS94QC3ZUS8do3pJbJ1uw HBTXN+vDum8R1v3G7oxArKy6zy7v0lvPpPr+JA+yCYmw9ldXPlpEo4wLuVdRc8litCIA FddzNbsq5HfejYrDNZkaWMU4f2hc0oYEj3P3AFMi7ZjoNq7on1ZGQH5vkj1oZoBwAzJJ nUmJAjb10hxomW13CTmFXfVDOhzIVaFdak29gMr04tffvU3OHi0eE7oPSeewBcdYEY5W Va1lpMVPj7tG4nNnT2264JkyxkQqV/ocKmum98iT3mbFB94HWrV6vl0j74d02ySwCCrR D6bQ== Received: by 10.152.105.173 with SMTP id gn13mr4150017lab.20.1345193696117; Fri, 17 Aug 2012 01:54:56 -0700 (PDT) Received: from [192.168.1.101] (dsl-hkibrasgw2-fedadf00-197.dhcp.inet.fi. [80.223.218.197]) by mx.google.com with ESMTPS id p2sm1587899lbj.4.2012.08.17.01.54.54 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 17 Aug 2012 01:54:55 -0700 (PDT) Message-ID: <502E06DE.7090206@enterprisedb.com> Date: Fri, 17 Aug 2012 11:54:54 +0300 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120624 Icedove/10.0.5 MIME-Version: 1.0 To: Bruce Momjian CC: Dmitriy Igrishin , pgsql-docs Subject: Re: Clarification suggestion for 46.4 chapter. References: <20120817020735.GQ30286@momjian.us> In-Reply-To: <20120817020735.GQ30286@momjian.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQkVm8GBLNyTbt0sZ4s3P/EUFuSMTnNON+zvozUw6y7bCQc74tyPGHaJ2WoQ7+5L7uPXnLrY X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201208/30 X-Sequence-Number: 7423 On 17.08.2012 05:07, Bruce Momjian wrote: > On Mon, Dec 5, 2011 at 02:53:22PM +0300, Dmitriy Igrishin wrote: >> Hey, >> >> The section 46.4 describes the base data types used in messages. >> http://www.postgresql.org/docs/9.1/static/protocol-message-types.html >> >> According to section 46.5 >> http://www.postgresql.org/docs/9.1/static/protocol-message-formats.html >> there are cases when Int32 can be negative (e.g. see DataRow(B) message >> description.) >> >> Thus, I would like to suggest to change the description of Int(i) >> from >> "An n-bit integer in network byte order ..." >> to >> "An n-bit signed integer in network byte order ..." > > OK, documentation updated. Actually, in some cases the integers are signed, and in others unsigned. For example, in a Bind('F') message, the number of parameters is an Int16 according to the docs, but it is treated as unsigned. The maximum number of parameters is 65535. The sentence used to be factually correct, when it didn't mention whether they're signed or unsigned. If we want to do better than that, we'd need to go through all the mentions of IntN in the docs and explicitly say which ones are signed and which ones unsigned. Perhaps use Uint16 or Uint32 for the unsigned ones. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com