Re: INT8 / float casting question

From: "ktm(at)rice(dot)edu" <ktm(at)rice(dot)edu>
To: Filip Rembiałkowski <filip(dot)rembialkowski(at)gmail(dot)com>
Cc: Community PostgreSQL <pgsql-sql(at)postgresql(dot)org>
Subject: Re: INT8 / float casting question
Date: 2014-10-31 15:15:10
Message-ID: 20141031151510.GG32559@aart.rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Julien Cigar 2014-10-31 15:17:10 Re: best strategy for searching large text fields
Previous Message Campbell, Lance 2014-10-31 14:59:48 best strategy for searching large text fields