PostgreSQL migrate data from one table to another (which inherits the first one) I have a table "company" and another named "school" ("school" table inherits "company").
Most of the data is community generated and sometimes a cleaning is needed.
I would like to be able to "transfer" a row from the company table to the school table without modifying its ID (because there could be some foreign keys linked to it).

Is there a clean way to do this ?

Thanks for your help.
You can use this method (assuming both tables have same columns in same order):

with T as (delete from only company where id=? returning *) 
    insert into school select * from T