March 11th, 2013, 07:46 AM
Maximum Autoincrement Value
What is the best way to cause an autoincrement column to roll after it reaches a specific maximum like 32768. I don't want to just define the column type to be smallint, but want the value to roll back to 1 and hole-fill if we reach the maximum.
Thanks for any ideas!
March 11th, 2013, 08:48 AM
A quick look into the manual for the CREATE SEQUENCE statement reveals:
Taken from: http://www.postgresql.org/docs/current/static/sql-createsequence.html
Originally Posted by Postgres manual
Please read the manual the next time before posting such a trivial question.
I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags.
Tips on how to ask better questions: