how to change default min sequence value for database

ungalnanban's Avatar, Join Date: Feb 2010
Go4Expert Member
I have this doubt, how to configure the default min value for sequence in postgresql? Is it possible?

I want to change the default min value of sequence in Postgresql for all my table in a database. I don't like to use CREATE SEQUENCE and ALTER SEQUENCE because I don't want to do manual work. If I create new table with sequence. that automatically should take the min value is 1000 instead of 1, after configured this If i create a sequence it should take default min val is 1000 (configured value)
Where I need to configure the min val and max value for sequence in Postgresql. Is there any variable in Postgresql.conf file

Thanks in advance
pein87's Avatar
Ambitious contributor
Code: SQL
do this before any rows are inserted so perform this right after the CREATE TABLE clause.