The following bug has been logged on the website:
Bug reference: 19101
Logged by: Jason Smith
Email address: dqetool@126.com
PostgreSQL version: 18.0
Operating system: Ubuntu 22.04
Description:
I try to store a large number in `BIGINT` and run `ceil(c1)` command.
However, the result lost some precision due to calling `decil` function.
```sql
CREATE TABLE t1 (c1 BIGINT);
INSERT INTO t1 VALUES (4854233034440979799);
-- dceil
SELECT ceil(c1) FROM t1; -- {4.854233034440979e+18}
```
The original number is expected to return. In this case, calling
numeric_ceil function may be proper, and I try the following case.
```sql
CREATE TABLE t1 (c1 DECIMAL(20,0));
INSERT INTO t1 VALUES (4854233034440979799);
-- numeric_ceil
SELECT ceil(c1) FROM t1; -- {4854233034440979799}
```