Re: INT8 / float casting question - Mailing list pgsql-sql

From ktm@rice.edu
Subject Re: INT8 / float casting question
Date
Msg-id 20141031151510.GG32559@aart.rice.edu
Whole thread Raw
In response to INT8 / float casting question  (Filip Rembiałkowski <filip.rembialkowski@gmail.com>)
List pgsql-sql
On Fri, Oct 31, 2014 at 03:58:06PM +0100, Filip Rembiałkowski wrote:
> psql.bin (9.3.4, server 9.3.5)
> Type "help" for help.
> 
> dev=# select (2^63-1)::INT8;
> ERROR:  bigint out of range
> 
> 
> Does it HAVE to be so?
> 
> 
> http://en.wikipedia.org/wiki/9223372036854775807
> 
> Thanks
> Filip

Yes:

http://www.postgresql.org/docs/9.3/static/datatype.html

Table 8-1:

bigint, aliases int8 - signed eight-byte integer

PostgreSQL does not have an unsigned integer type, since all the
SQL ones are signed.

Regards,
Ken



pgsql-sql by date:

Previous
From: "Campbell, Lance"
Date:
Subject: best strategy for searching large text fields
Next
From: Julien Cigar
Date:
Subject: Re: best strategy for searching large text fields