I have two tables 'jobs' and 'jobs_history' and for some reason 'jobs' inherites from 'jobs_history'. I want to change the inheritance such that 'jobs_history' inherites from 'jobs'. Since the columns are the same, there are some triggers and constraints which are not inherited I though this should be done easily by:
ALTER TABLE jobs NO INHERIT jobs_history; ALTER TABLE jobs_history INHERIT jobs;
and this executes without errors. The only thing is that the data has also moved. So all the data in jobs_history are now in jobs and vice versa.
Does anybody have an idea to why the above command makes the data move?