Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fRLIR-0005FN-BO for pgsql-general@arkaria.postgresql.org; Fri, 08 Jun 2018 17:35:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fRLIQ-0003Zg-4U for pgsql-general@arkaria.postgresql.org; Fri, 08 Jun 2018 17:35:30 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fRLIP-0003ZE-OR for pgsql-general@lists.postgresql.org; Fri, 08 Jun 2018 17:35:29 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fRLIM-0000Jg-Fk for pgsql-general@postgresql.org; Fri, 08 Jun 2018 17:35:28 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1C92A21A83; Fri, 8 Jun 2018 13:35:25 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 08 Jun 2018 13:35:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=JiNUFLpuHPH6S9eO/Mk/hy/NgnGzO P1KXweTYxZbphs=; b=yp/YJHn/UQSpwbpYZY3W4caZUBdl2MejjmAWuHLvU4Qoq RIEKeKEf84nmC499RXd60Rw7UFaYNXSYXk/99TtTqgaWsmTjSli8NOE4vA1/9FMt WeHahuT5FIrutigfhtTbkCh76o6TEzib2YxkvXBz8eFhEsrekJu5wIfTOQA0ZtPI R+A/ocNV6dQnivdmjPUpu34J6UOu7vS93NHmK9Ytac31W2wQu/eEvGjEjgM5/9Zd GWYbCKMqPndSfpo0rKooUmKMfVtovYrGGXJ1QL1h7wjpXQ230N9pbK19/BKT+0fl HXI9hgbumIzyJ+2/OqyFYVJ04hA+Tpg0zk1jU4Y/A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=JiNUFL puHPH6S9eO/Mk/hy/NgnGzOP1KXweTYxZbphs=; b=ZIBA3RTGxi4NeaQFWhfqLF sdWMPzwb5trmlX7loBMAOlssuoMfWid8Y3QQg6LTtLP3yddBOWiHN64ADC5jL0aW JGeGij9eBVgyYX+R3bHS5jpKXHjXR3yZ8m0IsIMBWks+0MwJPVeZI3BkboALKb5u 1snBaeUBN7ON2H8F4GOUznC5ySem3E8jlXKNF5F2Ms5pkSZiw8Scn5uNuLe8CAED X/ChBzferqvxP8wZUUgYxFoC8Yw/yfa2mIh9Iljd6D26cBLRGa9+7gy0c8lYliwl NaF/RzMJsmuZcwWp8B9Vead/EvnsU59iTFSCBqfX7XjJWG63qgkEX0E3eiST2y8w == X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.159.209]) by mail.messagingengine.com (Postfix) with ESMTPA id 7400EE42DB; Fri, 8 Jun 2018 13:35:24 -0400 (EDT) Subject: Re: (2^63 - 1)::bigint => out of range? (because of the double precision) To: Alexey Dokuchaev , pgsql-general@postgresql.org References: <20180608172323.GA32312@regency.nsu.ru> From: Adrian Klaver Message-ID: <718d7650-fb14-afce-2b34-334bc5cbbd5b@aklaver.com> Date: Fri, 8 Jun 2018 10:35:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180608172323.GA32312@regency.nsu.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 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