Before changing the partition type or key, you must drop all indexes.
alter table titles partition by hash(title_id) 3 on (seg1, seg2, seg3)
alter table titles partition by range (total_sales) (smallsales values <= (500) on seg1, mediumsales values <= (5000) on seg2, bigsales values <= (25000) on seg3)
This example changes the partition key but not the partitioning type:
alter table titles partition by range(pubdate) (q1 values <= ("3/31/2006"), q2 values <= ("6/30/2006"), q3 values <= ("9/30/2006"), q1 values <= ("12/31/2006"))