[wp-hackers] BIGINT(20) ... was: Is there a limit to the number of sub categories?

Stephen Rider wp-hackers at striderweb.com
Wed Mar 12 17:07:40 GMT 2008


On Mar 11, 2008, at 8:18 PM, Eric Marden wrote:

>>> It's a BIGINT with a 20 digit limit. ;)
>>>
>> The "BIGINT(20)" specification isn't a digit limit.  It just means  
>> that when
>> the data is displayed, if it uses less than 20 digits it will be  
>> left-padded
>> with zeros. 2^64 is the hard limit for the BIGINT type, and has 20  
>> digits
>> itself, hence BIGINT(20) just means everything less than 10^20 will  
>> be
>> left-padded with spaces on display.  This is kind of getting off  
>> topic
>> though, so...
>
> The '20' is the maximum display width. However, this does NOT limit  
> the range of values that can be stored in this column, which for  
> bigint is: -9223372036854775808 to 9223372036854775807
>
> If its unsigned (which this one is not), a bigint has this range: 0  
> to 18446744073709551615

Goofy hacker question:  Does this mean that we can have posts with  
negative numbers? :)


More information about the wp-hackers mailing list