I have a small table (~30 rows) in my Postgres 9.0 database with an integer ID field (the primary key) which currently contains unique sequential integers starting at 1, but which was not created using the ‘serial’ keyword.
How can I alter this table such that from now on inserts to this table will cause this field to behave as if it had been created with ‘serial’ as a type?
Look at the following commands (especially the commented block).