I have a database with a more than 100 tables. In each table i have column named id (int8 NOT NULL) with primary key. I would like to update whole database (all columns) to change this id type to SERIAL.
The reason is problem with inserting data. I would like to know how to write a procedure which will upadate in one shot all tables.

Check Solution