Re: pgsql: Fix pg_size_bytes() to be more portable.
От | Tom Lane |
---|---|
Тема | Re: pgsql: Fix pg_size_bytes() to be more portable. |
Дата | |
Msg-id | 21899.1455990079@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: pgsql: Fix pg_size_bytes() to be more portable. (Dean Rasheed <dean.a.rasheed@gmail.com>) |
Список | pgsql-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
В списке pgsql-committers по дате отправления: