Re: 128-bit integers can range only up to (2 ^ 63 -1)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: 128-bit integers can range only up to (2 ^ 63 -1)
Date: 2023-01-03 15:20:06
Message-ID: 1759627.1672759206@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

jian he <jian(dot)universality(at)gmail(dot)com> writes:
> I am slightly confused by the int128 type. I thought the 128 bit integer
> means range type will be upto 2 ^ 127 - 1.
> Now just copy the above code and test the int128 range.
> int128 can only up to 9223372036854775807 (2 ^ 63 -1).

What's your grounds for claiming that?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michail Nikolaev 2023-01-03 15:20:11 Re: Data loss on logical replication, 12.12 to 14.5, ALTER SUBSCRIPTION
Previous Message Melih Mutlu 2023-01-03 14:53:05 Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication