Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aXBX3-0006Rl-Ck for pgsql-committers@arkaria.postgresql.org; Sat, 20 Feb 2016 17:41:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aXBX2-0001NC-VP for pgsql-committers@arkaria.postgresql.org; Sat, 20 Feb 2016 17:41:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aXBX2-0001N0-G1 for pgsql-committers@postgresql.org; Sat, 20 Feb 2016 17:41:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aXBWz-0004v4-KM for pgsql-committers@postgresql.org; Sat, 20 Feb 2016 17:41:24 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u1KHfJxK021900; Sat, 20 Feb 2016 12:41:19 -0500 From: Tom Lane To: Dean Rasheed cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Fix pg_size_bytes() to be more portable. In-reply-to: References: <5432.1455980047@sss.pgh.pa.us> <6029.1455980933@sss.pgh.pa.us> <10663.1455985971@sss.pgh.pa.us> Comments: In-reply-to Dean Rasheed message dated "Sat, 20 Feb 2016 17:29:40 +0000" Date: Sat, 20 Feb 2016 12:41:19 -0500 Message-ID: <21899.1455990079@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org Dean Rasheed writes: > On 20 February 2016 at 17:24, Dean Rasheed wrote: >> It looks to me as though it doesn't need long long anyway, since the >> rotation it's doing can be done just as easily with ints, for example: > Oh, scratch that -- I was assuming int would be 32-bit, which it might not be. There's quite a lot of our code that does assume "int" is 32 bits. (It would be better to write int32 where it matters, but I really doubt we've been completely consistent about that.) It probably isn't worth worrying about; I think the platforms where "int" means int16 are all dead and buried, or at least far too underpowered to run modern Postgres. At some point we might have to contend with "int" meaning int64, but I haven't heard of any such platforms yet. The real issue is with "long" and "long long", which definitely do vary in width across supported platforms. regards, tom lane -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers