[wp-hackers] BIGINT(20) ... was: Is there a limit to the number
of sub categories?
Dan Larkin
nitephire at gmail.com
Wed Mar 12 21:04:46 GMT 2008
Oh wow, it really isn't unsigned. To answer your question about posts, no.
The id field for the posts table is unsigned. The term_id field for the
terms table is indeed a signed value. I haven't looked at the WP code yet,
but I can't think of a reason of the top of my head why WP would want to use
a signed value for an id field of any kind...
:: Dan Larkin
On 3/12/08, Stephen Rider <wp-hackers at striderweb.com> wrote:
>
>
> 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? :)
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list