Re: BUG #14442: serial maxvalue incorrect

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: josipa(dot)milic(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14442: serial maxvalue incorrect
Date: 2016-11-30 16:01:15
Message-ID: 19045.1480521675@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

josipa(dot)milic(at)gmail(dot)com writes:
> When table is generated using pgadmin, sequence generated as serial has the
> same maxvalue as bigserial: 9223372036854775807

Yup.

> It should be max value that corresponds to integer: 2147483647

No, that's intentional. If you never run out of serial numbers,
it's not going to matter. If you do run out, you'll get an error
anyway (from trying to stuff a value > 2147483647 into an integer
column). And the sequence limit will be one less thing you'll
have to change on the way to fixing it.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message jec 2016-12-01 10:34:57 BUG #14443: JDBC Driver > 1208 doesn't work with PGADV server
Previous Message josipa.milic 2016-11-30 09:34:30 BUG #14442: serial maxvalue incorrect