BUG #18481: BIGINT Out of Range Error When Selecting Data - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #18481: BIGINT Out of Range Error When Selecting Data
Date
Msg-id 18481-35944435b18b2d6f@postgresql.org
Whole thread Raw
Responses Re: BUG #18481: BIGINT Out of Range Error When Selecting Data  (Guillaume Lelarge <guillaume@lelarge.info>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18481
Logged by:          Wenking Deng
Email address:      dengwenking@gmail.com
PostgreSQL version: 16.0
Operating system:   Ubuntu
Description:

Create the table and insert the values:

CREATE TABLE t0 (c_0 BIGINT, c_1 BIGINT, c_2 BIGINT);
INSERT INTO t0 VALUES (-9223372036854775808, 145477110, 0);

Then I executed the following query:

SELECT t0.c_1 
FROM t0 
WHERE (t0.c_2 <> t0.c_0 * t0.c_1 AND t0.c_0 = -9223372036854775808) 
AND t0.c_1 = 145477110;

Expected Behavior:
The query should return: 145477110

Actual Behavior:
The query results in an error: ERROR: bigint out of range


pgsql-bugs by date:

Previous
From: "Eckardt, Martin"
Date:
Subject: AW: BUG #18473: Problems deployment postgresql for windows
Next
From: Pengfei Wang
Date:
Subject: Re: issue: nbtpage.c,_bt_pagedel may get wrong result