How can diabetes mellitus result in polydipsia?