It probably won't be long before we have custom constraint names. This really needs to select against table_constraints for constraint_type='PRIMARY' and join against key_column_usage. Also needs to ORDER BY ordinal_position.