Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T6s16-0007CM-UA for pgsql-bugs@postgresql.org; Wed, 29 Aug 2012 23:49:49 +0000 Received: from news.hub.org ([200.46.204.72]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T6s14-0005kI-Lt for pgsql-bugs@postgresql.org; Wed, 29 Aug 2012 23:49:48 +0000 Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.5/8.14.5) with ESMTP id q7TNnj6r039648 for ; Wed, 29 Aug 2012 20:49:45 -0300 (ADT) (envelope-from news@news.hub.org) Received: from news.hub.org (news@localhost) by news.hub.org (8.14.5/8.14.5/Submit) with NNTP id q7TNcS1h032227 for pgsql-bugs@postgresql.org; Wed, 29 Aug 2012 20:38:28 -0300 (ADT) (envelope-from news) Received: by 10.66.83.74 with SMTP id o10mr585985pay.33.1346283508002; Wed, 29 Aug 2012 16:38:28 -0700 (PDT) Received: by 10.68.136.7 with SMTP id pw7mr754230pbb.1.1346283507987; Wed, 29 Aug 2012 16:38:27 -0700 (PDT) X-Newsgroups: pgsql.bugs Date: Wed, 29 Aug 2012 16:38:27 -0700 (PDT) In-Reply-To: <24664.1192051937@sss.pgh.pa.us> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=67.128.198.190; posting-account=5KnQ5QoAAABJp1koyLOWZha15uS8v7Kz References: <200710101902.l9AJ2Lbn080555@wwwmaster.postgresql.org> <24664.1192051937@sss.pgh.pa.us> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <5a4b25cd-3398-4b5c-90a6-9788b4957bdd@googlegroups.com> Subject: Re: BUG #3668: type error in serial From: Dave Johansen Injection-Date: Wed, 29 Aug 2012 23:38:27 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable To: pgsql-bugs@postgresql.org X-Pg-Spam-Score: -2.1 (--) X-Archive-Number: 201208/237 X-Sequence-Number: 33961 On Wednesday, October 10, 2007 2:32:17 PM UTC-7, Tom Lane wrote: > "Eric Weimer" writes: > > Creating a table with a column of type serial causes the creation of a > > sequence tied as the default value for the column. > > The actual type of the column is integer, however the sequence created = is of > > type bigint. If the sequence is created as a bigint, then the column sh= ould > > also be defined as bigint.=20 >=20 > This is not a bug, primarily because we have only one size of sequence. >=20 > regards, tom lane >=20 > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings I believe that the SERIAL type should set the MAXVALUE appropriately (that = of a 32 bit number) because then it could give an error like "reached maxim= um value of sequence" rather than having people beating their heads against= the wall because they can't figure out why they're getting an error of "in= teger out of range". That seems like a relatively minor change that could s= ave people a LOT of headache. Dave