pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #8718: serial datatype creates a sequence with bigserial limits
2+ messages / 2 participants
[nested] [flat]

* BUG #8718: serial datatype creates a sequence with bigserial limits
@ 2014-01-03 12:33 richcocoa@gmail.com
  2014-01-03 21:25 ` Re: BUG #8718: serial datatype creates a sequence with bigserial limits David Johnston <polobo@yahoo.com>
  0 siblings, 1 reply; 2+ messages in thread

From: richcocoa@gmail.com @ 2014-01-03 12:33 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      8718
Logged by:          Richard Savio
Email address:      richcocoa@gmail.com
PostgreSQL version: 9.3.2
Operating system:   Arch Linux 3.12.16 Linux kernel
Description:        

If you create a column with serial data type, it is created as an INTEGER
field but the sequence used to auto-increment the field has a limit only
suitable for BIGINT, so it may result in out of range errors.



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #8718: serial datatype creates a sequence with bigserial limits
  2014-01-03 12:33 BUG #8718: serial datatype creates a sequence with bigserial limits richcocoa@gmail.com
@ 2014-01-03 21:25 ` David Johnston <polobo@yahoo.com>
  0 siblings, 0 replies; 2+ messages in thread

From: David Johnston @ 2014-01-03 21:25 UTC (permalink / raw)
  To: pgsql-bugs

richcocoa wrote
> The following bug has been logged on the website:
> 
> Bug reference:      8718
> Logged by:          Richard Savio
> Email address:      

> richcocoa@

> PostgreSQL version: 9.3.2
> Operating system:   Arch Linux 3.12.16 Linux kernel
> Description:        
> 
> If you create a column with serial data type, it is created as an INTEGER
> field but the sequence used to auto-increment the field has a limit only
> suitable for BIGINT, so it may result in out of range errors.

Yes, it does.  This is by design.  You can either get a "sequence out of
range" error or an "integer overflow error" if you run against the limit. 
At least this way you can alter the type to be a bigint without having to
worry about messing with the sequence.

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-8718-serial-datatype-creates-a-sequence-with-bigserial-l...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2014-01-03 21:25 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-01-03 12:33 BUG #8718: serial datatype creates a sequence with bigserial limits richcocoa@gmail.com
2014-01-03 21:25 ` David Johnston <polobo@yahoo.com>

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