Tag Archives: sequence

PostgreSQL set sequences to max value

When you import data into a PostgreSQL database, the sequences are not updated automatically. In the PostgreSQL wiki there is a guide showing you how to update the sequences to the max value of the id column by generating a query for each table.

Here is the full guide: Fixing Sequences