pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
BUG #14049: Integer out of range on insert with default id 2+ messages / 2 participants [nested] [flat]
* BUG #14049: Integer out of range on insert with default id @ 2016-03-28 23:06 d.j.yotta@gmail.com 2016-03-28 23:27 ` Re: BUG #14049: Integer out of range on insert with default id Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 2+ messages in thread From: d.j.yotta@gmail.com @ 2016-03-28 23:06 UTC (permalink / raw) To: pgsql-bugs The following bug has been logged on the website: Bug reference: 14049 Logged by: Daniel Sheffield Email address: d.j.yotta@gmail.com PostgreSQL version: 9.5.1 Operating system: Linux x64 Description: Not sure if this is a bug, but it seems strange to me that the SERIAL numeric type is 4 bytes, yet the default backing sequence for which nextval() is called is 8 bytes. http://www.postgresql.org/docs/9.5/static/datatype-numeric.html I'm seeing 'integer out of range' upon inserting into a table where all of the parameters look fine. The id parameter is not specified and hence will be generated automatically by the sequence, causing the insert to fail if the generated id is bigger than maximum int value. -- 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 #14049: Integer out of range on insert with default id 2016-03-28 23:06 BUG #14049: Integer out of range on insert with default id d.j.yotta@gmail.com @ 2016-03-28 23:27 ` Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2016-03-28 23:27 UTC (permalink / raw) To: d.j.yotta@gmail.com; +Cc: pgsql-bugs d.j.yotta@gmail.com writes: > Not sure if this is a bug, but it seems strange to me that the SERIAL > numeric type is 4 bytes, yet the default backing sequence for which > nextval() is called is 8 bytes. > http://www.postgresql.org/docs/9.5/static/datatype-numeric.html > I'm seeing 'integer out of range' upon inserting into a table where all of > the parameters look fine. The id parameter is not specified and hence will > be generated automatically by the sequence, causing the insert to fail if > the generated id is bigger than maximum int value. Well, once you've run out of 4-byte integers, that's going to fail one way or another. regards, tom lane -- 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:[~2016-03-28 23:27 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-03-28 23:06 BUG #14049: Integer out of range on insert with default id d.j.yotta@gmail.com 2016-03-28 23:27 ` Tom Lane <tgl@sss.pgh.pa.us>
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