Test partitioned tables in PG

1)create partitioned tables in PG
2)test whether the data is put into the right partitioned table & whether the data is correct
3)Joined table test: test whether related data in different partitioned tables is deleted due to the action 'destroy'