From http://dba.stackexchange.com/questions/40441/get-all-partition-names-for-a-table