mirror of
https://github.com/postgres/postgres.git
synced 2025-10-16 17:07:43 +03:00
Add regression test to see if the min/max values of int8 convert correctly.
This commit is contained in:
@@ -283,3 +283,20 @@ SELECT '' AS to_char_17, to_char(q2, '999999SG9999999999') FROM INT8_TBL;
|
|||||||
| 456789-0123456789
|
| 456789-0123456789
|
||||||
(5 rows)
|
(5 rows)
|
||||||
|
|
||||||
|
-- check min/max values
|
||||||
|
select '-9223372036854775808'::int8;
|
||||||
|
int8
|
||||||
|
----------------------
|
||||||
|
-9223372036854775808
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
select '-9223372036854775809'::int8;
|
||||||
|
ERROR: int8 value out of range: "-9223372036854775809"
|
||||||
|
select '9223372036854775807'::int8;
|
||||||
|
int8
|
||||||
|
---------------------
|
||||||
|
9223372036854775807
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
select '9223372036854775808'::int8;
|
||||||
|
ERROR: int8 value out of range: "9223372036854775808"
|
||||||
|
@@ -283,3 +283,20 @@ SELECT '' AS to_char_17, to_char(q2, '999999SG9999999999') FROM INT8_TBL;
|
|||||||
| 456789-0123456789
|
| 456789-0123456789
|
||||||
(5 rows)
|
(5 rows)
|
||||||
|
|
||||||
|
-- check min/max values
|
||||||
|
select '-9223372036854775808'::int8;
|
||||||
|
int8
|
||||||
|
----------------------
|
||||||
|
-9223372036854775808
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
select '-9223372036854775809'::int8;
|
||||||
|
ERROR: int8 value out of range: "-9223372036854775809"
|
||||||
|
select '9223372036854775807'::int8;
|
||||||
|
int8
|
||||||
|
---------------------
|
||||||
|
9223372036854775807
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
select '9223372036854775808'::int8;
|
||||||
|
ERROR: int8 value out of range: "9223372036854775808"
|
||||||
|
@@ -53,3 +53,9 @@ SELECT '' AS to_char_14, to_char(q2, 'FM9999999999999999.999') FROM INT8_TBL;
|
|||||||
SELECT '' AS to_char_15, to_char(q2, 'S 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 . 9 9 9') FROM INT8_TBL;
|
SELECT '' AS to_char_15, to_char(q2, 'S 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 . 9 9 9') FROM INT8_TBL;
|
||||||
SELECT '' AS to_char_16, to_char(q2, '99999 "text" 9999 "9999" 999 "\\"text between quote marks\\"" 9999') FROM INT8_TBL;
|
SELECT '' AS to_char_16, to_char(q2, '99999 "text" 9999 "9999" 999 "\\"text between quote marks\\"" 9999') FROM INT8_TBL;
|
||||||
SELECT '' AS to_char_17, to_char(q2, '999999SG9999999999') FROM INT8_TBL;
|
SELECT '' AS to_char_17, to_char(q2, '999999SG9999999999') FROM INT8_TBL;
|
||||||
|
|
||||||
|
-- check min/max values
|
||||||
|
select '-9223372036854775808'::int8;
|
||||||
|
select '-9223372036854775809'::int8;
|
||||||
|
select '9223372036854775807'::int8;
|
||||||
|
select '9223372036854775808'::int8;
|
||||||
|
Reference in New Issue
Block a user