pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Fix pg_size_bytes() to be more portable.
Date: Sat, 20 Feb 2016 12:41:19 -0500
Message-ID: <21899.1455990079@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEZATCWCd+KZAHfN8rARudSy_MNjguWb5pp4E_nApk3hP86m=Q@mail.gmail.com>
References: <E1aX5Rv-00022d-Gr@gemulon.postgresql.org>
	<5432.1455980047@sss.pgh.pa.us>
	<CAEZATCWb+PEpsPi1w4MnnVSSs_y6OQJULRkjgXaj72ugOtLR7w@mail.gmail.com>
	<6029.1455980933@sss.pgh.pa.us>
	<10663.1455985971@sss.pgh.pa.us>
	<CAEZATCXkf-UHrrWe9nGb6kk8ApZTd5=T=DMLTWxihQa_mn5ACw@mail.gmail.com>
	<CAEZATCWCd+KZAHfN8rARudSy_MNjguWb5pp4E_nApk3hP86m=Q@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> On 20 February 2016 at 17:24, Dean Rasheed <dean.a.rasheed@gmail.com> 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



view thread (8+ messages)

Message-ID: <21899.1455990079@sss.pgh.pa.us>
Permalink:  ../21899.1455990079@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21899.1455990079@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dean.a.rasheed@gmail.com
  Subject: Re: pgsql: Fix pg_size_bytes() to be more portable.
  In-Reply-To: <21899.1455990079@sss.pgh.pa.us>
  References: <E1aX5Rv-00022d-Gr@gemulon.postgresql.org> <5432.1455980047@sss.pgh.pa.us> <CAEZATCWb+PEpsPi1w4MnnVSSs_y6OQJULRkjgXaj72ugOtLR7w@mail.gmail.com> <6029.1455980933@sss.pgh.pa.us> <10663.1455985971@sss.pgh.pa.us> <CAEZATCXkf-UHrrWe9nGb6kk8ApZTd5=T=DMLTWxihQa_mn5ACw@mail.gmail.com> <CAEZATCWCd+KZAHfN8rARudSy_MNjguWb5pp4E_nApk3hP86m=Q@mail.gmail.com> <21899.1455990079@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox