Re: [BUGS] Usability or Data Bug in SERIAL column declarations

2004-10-27 Thread Tom Lane
elein <[EMAIL PROTECTED]> writes: > But shouldn't it wrap when it hits the max? No, absolutely not. The default sequence behavior is NO CYCLE, meaning you'll start getting errors from nextval() when you reach the max. I don't see a lot of difference between getting that error and getting an int8-

Re: [BUGS] Usability or Data Bug in SERIAL column declarations

2004-10-27 Thread elein
But shouldn't it wrap when it hits the max? Assuming wrapping is an OK behavior, not setting a proper max will eliminate that option for overflow. --elein On Wed, Oct 27, 2004 at 08:30:37PM -0400, Tom Lane wrote: > elein <[EMAIL PROTECTED]> writes: > > In both cases sequences are created as int8

Re: [BUGS] Usability or Data Bug in SERIAL column declarations

2004-10-27 Thread Tom Lane
elein <[EMAIL PROTECTED]> writes: > In both cases sequences are created as int8 values with > a maximum of 9223372036854775807. > BUG: The assignment of the table containing the int4 column > will overflow at 2147483648 (max integer size). I don't think this is really a problem. You are going t

[BUGS] Usability or Data Bug in SERIAL column declarations

2004-10-27 Thread elein
This was tested in 7.4. If you have a table where you declare a column to be SERIAL, the data type of that column will be set to type integer (int4). If you have a table where you declare a column to be SERIAL8, the data type of that column will be set to type bigint (int8). In both cases sequ