Show that there is an analytic function $f$ on unit open disc $D$ which is not analytic on any connected open set $G$ which properly contains $D$.
My attempt : I know Weierstrass factorization theorem for a region $G$ then I can find a sequence $\{a_n\}$ of points which lies in unit circle and construct an analytic function $g$ which only have zeros on that points $\{a_n\}$. Finally if I consider $f=1/g$ then $f$ satisfy the require properties. Am I right or is there is any other issues or nice examples?
Any help/hint in this regards would be highly appreciated. Thanks in advance!