From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: dengwenking@gmail.com
Subject: BUG #18481: BIGINT Out of Range Error When Selecting Data
Date: Mon, 27 May 2024 11:23:03 +0000
Message-ID: <18481-35944435b18b2d6f@postgresql.org> (raw)
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
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, dengwenking@gmail.com
Subject: Re: BUG #18481: BIGINT Out of Range Error When Selecting Data
In-Reply-To: <18481-35944435b18b2d6f@postgresql.org>
* 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