From: | PG Bug reporting form <noreply(at)postgresql(dot)org> |
---|---|
To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Cc: | whiteman(dot)kr(at)gmail(dot)com |
Subject: | BUG #15071: Error in PostgreSQL-specific :: type cast |
Date: | 2018-02-16 11:57:59 |
Message-ID: | 151878227914.1391.18108972186680794975@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 15071
Logged by: Yuriy Beliy
Email address: whiteman(dot)kr(at)gmail(dot)com
PostgreSQL version: 10.1
Operating system: Windows 10
Description:
PostgreSQL-specific :: type casts for lowest values of integer types are
produce "Out of range" errors:
SELECT -32768::smallint
^ERROR: smallint out of range
SELECT -2147483648::integer
^ERROR: integer out of range
SELECT -9223372036854775808::bigint
^ERROR: bigint out of range
Standard-syntax type casts are workes correctly:
SELECT cast(-32768 as smallint)
^Ok
SELECT cast(-2147483648 as integer)
^Ok
SELECT cast(-9223372036854775808 as bigint)
^Ok
For highest values (+32767, +2147483647, +9223372036854775807) - :: type
cast works correctly.
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2018-02-16 13:01:10 | Re: BUG #15071: Error in PostgreSQL-specific :: type cast |
Previous Message | PG Bug reporting form | 2018-02-16 09:12:15 | BUG #15070: description |