Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtrUl-00084u-Kg for pgsql-docs@arkaria.postgresql.org; Wed, 04 Nov 2015 06:24:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZtrUl-0000rE-1q for pgsql-docs@arkaria.postgresql.org; Wed, 04 Nov 2015 06:24:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZtrUk-0000qy-F5 for pgsql-docs@postgresql.org; Wed, 04 Nov 2015 06:24:30 +0000 Received: from mail-qg0-x22f.google.com ([2607:f8b0:400d:c04::22f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZtrUh-0001YO-E8 for pgsql-docs@postgresql.org; Wed, 04 Nov 2015 06:24:30 +0000 Received: by qgeo38 with SMTP id o38so33471832qge.0 for ; Tue, 03 Nov 2015 22:24:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Nx4gfAi3Llg87MQ8VUsDAtD1xmUK0ihdBa3PvQag5yc=; b=NBuXf9Knfj+gBtTNb3TevMzWTh0eUFI9V8kIxtzDlbRIoIH5sgeol19apAfQ1f5PUF EKBvxAnI5N4ngKckuSLVay+UZeCMzXoUg6oxYCweVlrNc4JL4nLnhGUsG4LwLqqzroK3 5MzC0rCduwZeAi19VeiTPTxG6Wve4LscpEhR/JSkjvPxp2A9Elz9D8l4YPGPNVLVlkCm FvDhxbISVNYHCNso0drFlp9cua/RINcoi0wC9loHt3uBfQHdhZ7raPgQBZz4Moa5m5dH KGOvujPtjo9+QOlaMjNqrP84geb3Mbti5QjDowykHyrVADRf0M1+wYxuoaIEbwCR8aUU DFDw== MIME-Version: 1.0 X-Received: by 10.140.93.1 with SMTP id c1mr41483095qge.59.1446618265539; Tue, 03 Nov 2015 22:24:25 -0800 (PST) Received: by 10.140.39.199 with HTTP; Tue, 3 Nov 2015 22:24:25 -0800 (PST) In-Reply-To: References: Date: Wed, 4 Nov 2015 15:24:25 +0900 Message-ID: Subject: Re: Numeric Type Serial Range From: Michael Paquier To: Lewis Christie Cc: pgsql-docs@postgresql.org Content-Type: multipart/alternative; boundary=001a113ab9a6d7e0010523b10f27 X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --001a113ab9a6d7e0010523b10f27 Content-Type: text/plain; charset=UTF-8 On Tue, Nov 3, 2015 at 12:28 PM, Lewis Christie wrote: > I believe the range listed in Table 8-2. Numeric Types > http://www.postgresql.org/docs/9.3/static/datatype-numeric.html is > incorrect for the serial types. > > E.g. > serial4 bytesautoincrementing integer1 to 2147483647This describes the > auto-incrementing behaviour, but in practice the range is -2147483648 to > +2147483647 as the only restriction on the created column is NOT NULL. > I would believe that this refers to the default range of a serial column, which begins at 1 once the table using it is declared. -- Michael --001a113ab9a6d7e0010523b10f27 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Tue, Nov 3, 2015 at 12:28 PM, Lewis Christie <<= a href=3D"mailto:lewis.christie@gmail.com" target=3D"_blank">lewis.christie= @gmail.com> wrote:
I believe the range listed in=C2=A0Table 8-2. Numeric Types=C2=A0http:/= /www.postgresql.org/docs/9.3/static/datatype-numeric.html is incorrect = for the serial types.

E.g.
serial<= td style=3D"border:1px solid rgb(167,198,223);padding:0.5ex;background-colo= r:rgb(255,255,255)">1 to 2147483647
4 bytesautoincrementing integer
This describes th= e auto-incrementing behaviour, but in practice the range is -2147483648 to +21= 47483647 as the only restriction on the created column is NOT NULL.

I would believe tha= t this refers to the default range of a serial column, which begins at 1 on= ce the table using it is declared.
--
Michael
--001a113ab9a6d7e0010523b10f27--