2. As shown in the figure, $AB$ is the diameter of $\odot O$ with a radius of 1, the perpendicular bisector of $OA$ intersects $AB$ at $C$, and intersects $\odot O$ at $P$ and $Q$. With $C$ as the center and $CP$ as the radius, a circle intersects $AB$ at $D$. Connect $QD$ and extend it to intersect $\odot O$ at $M$. Then the length of $PM$ is ().
(A) 1
(B) $\sqrt{2}$
(C) $\sqrt{3}$
(D) $\frac{\sqrt{5}}{2}$
2. (B).

Hint: It is easy to know that $\angle P Q M=45^{\circ}$. In the inscribed $\triangle P Q M$ of $\odot O$, by the Law of Sines, we get.