| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | d(dot)j(dot)yotta(at)gmail(dot)com |
| Cc: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: BUG #14049: Integer out of range on insert with default id |
| Date: | 2016-03-28 23:27:51 |
| Message-ID: | 25772.1459207671@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
d(dot)j(dot)yotta(at)gmail(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | mschuch | 2016-03-29 09:38:04 | BUG #14050: "could not reserve shared memory region" in postgresql log |
| Previous Message | d.j.yotta | 2016-03-28 23:06:32 | BUG #14049: Integer out of range on insert with default id |