I want to set primary value to start with 1000 in postgres.
i know a command in mysql
ALTER TABLE tablename AUTO_INCREMENT = 1000
how to write the above mysql command in postgres ?
identity (and the somewhat outdated serial) columns are based on sequences.
You can set the sequence associated with such a column using setval()
select setval(pg_get_serial_sequence('table_name', 'column_name'), 1000);
identity columns. See here for details