agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: ktm@rice.edu <ktm@rice.edu>
To: Filip RembiaƂkowski <filip.rembialkowski@gmail.com>
Cc: Community PostgreSQL <pgsql-sql@postgresql.org>
Subject: Re: INT8 / float casting question
Date: Fri, 31 Oct 2014 10:15:10 -0500
Message-ID: <20141031151510.GG32559@aart.rice.edu> (raw)
In-Reply-To: <CAP_rwwksWXsxon-fbG5itzXPjCHAY9cXoKH139jVV1J3J5w+8A@mail.gmail.com>
References: <CAP_rwwksWXsxon-fbG5itzXPjCHAY9cXoKH139jVV1J3J5w+8A@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (4+ messages)  latest in thread

Message-ID: <20141031151510.GG32559@aart.rice.edu>
Permalink:  ../20141031151510.GG32559@aart.rice.edu/
Also on:    postgresql.org/message-id/20141031151510.GG32559@aart.rice.edu

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ktm@rice.edu, filip.rembialkowski@gmail.com
  Subject: Re: INT8 / float casting question
  In-Reply-To: <20141031151510.GG32559@aart.rice.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox