Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2011

    Unanswered: Serial and BigSerial maxvalues

    When I define a serial or bigserial field type, a sequence is created. In any case, the maxvalue equals 9223372036854775807 which corresponds to a bigint value. Why?

    Jorge Maldonado

  2. #2
    Join Date
    Nov 2003
    Provided Answers: 23
    Probably because sequences are based on bigint, so there is no way to create a sequence that returns integers.

    Quote Originally Posted by Postgres manual
    Sequences are based on bigint arithmetic, so the range cannot exceed the range of an eight-byte integer
    Taken from:

    If you are concerned about this, then use a bigserial type.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts