Postgres mengatur nilai urutan ke ID maks

SELECT setval('table_id_seq', (SELECT MAX(id) FROM table));
Awful Angelfish