pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Alexey Dokuchaev <danfe@nsu.ru>
To: pgsql-general@postgresql.org
Subject: Re: (2^63 - 1)::bigint => out of range? (because of the double precision)
Date: Fri, 8 Jun 2018 10:35:23 -0700
Message-ID: <718d7650-fb14-afce-2b34-334bc5cbbd5b@aklaver.com> (raw)
In-Reply-To: <20180608172323.GA32312@regency.nsu.ru>
References: <20180608172323.GA32312@regency.nsu.ru>

On 06/08/2018 10:23 AM, Alexey Dokuchaev wrote:
> Hi there,
> 

> P.S.  On a tangentally related note, why is "NO CYCLE" is the default
> for sequences?
> 
> [*] Per documentation, "The [SQL] standard's AS <data type> expression
> is not supported."  Another "why is it so?" question, btw. ;-)
> 

I found it. Its in the docs for 9.6-. That is not the case anymore in 10+:

https://www.postgresql.org/docs/10/static/sql-createsequence.html
"data_type

     The optional clause AS data_type specifies the data type of the 
sequence. Valid types are smallint, integer, and bigint. bigint is the 
default. The data type determines the default minimum and maximum values 
of the sequence.
"


-- 
Adrian Klaver
adrian.klaver@aklaver.com




view thread (7+ messages)  latest in thread

Message-ID: <718d7650-fb14-afce-2b34-334bc5cbbd5b@aklaver.com>
Permalink:  ../718d7650-fb14-afce-2b34-334bc5cbbd5b@aklaver.com/
Also on:    postgresql.org/message-id/718d7650-fb14-afce-2b34-334bc5cbbd5b@aklaver.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, danfe@nsu.ru
  Subject: Re: (2^63 - 1)::bigint => out of range? (because of the double precision)
  In-Reply-To: <718d7650-fb14-afce-2b34-334bc5cbbd5b@aklaver.com>
  References: <20180608172323.GA32312@regency.nsu.ru> <718d7650-fb14-afce-2b34-334bc5cbbd5b@aklaver.com>

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

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