Type index and postgresql