How far can we take "If $f$ is holomorphic in $D\setminus C$, $f$ is holomorphic in $D$."? It is a theorem of Riemann that if a function $f:D\to\Bbb C$ is holomorphic in all but finitely many points where it is continuous, then in fact $\mathcal O(D)\ni f$. An exercise in Remmert's introductory text asks to prove this is true if $f$ is holomorphic in $D$ except for a line in $D$, where it is continuous. Can one characterize the subsets $C$ of a fixed open set $D$ such that the claim  "If $f$ is holomorphic in $D\setminus C$, $f$ is holomorphic in $D$." holds true?
 A: The claim you made in the end "if $f$ is holomorphic in $D\backslash C$ then $f$ is holomorphic in $D$" is wrong even when $C$ is one point.
You need some additional condition, like "f is bounded", or "f is continuous", or something like this. Whenever you have some class $X$ of holomorphic functions, a set $C$ for which the above statement holds for $f$ in the class is called a removable set for this class. The Riemann theorem you mentioned is actually true for the class of bounded functions (not only continuous). Removable sets for various classes are described in terms of various capacities. For example, removable sets for bounded analytic functions are described in terms of analytic capacity, and there was recently a great progress in understanding removable sets for this class. You can look in the Wikipedia article "Analytic capacity" to begin with.
A: Finding sufficient and necessary conditions (in geometric terms) for a set to be removable with respect to a some class of analytic functions outside the set is in general an extremely difficult problem. For the class of bounded analytic functions, the problem is usually referred to as Painlevé's problem and it took more than a hundred years to obtain a reasonable solution, thanks to the work of Tolsa, David, Melnikov and many other people. A good reference for this is Tolsa's recent book "Analytic Capacity, the Cauchy Transform, and Non-homogeneous Calderón–Zygmund Theory" and Dudziak's book "Vitushkin's conjecture for removable sets".
What you're interested in is equivalent to finding necessary and sufficient conditions for function continuous on the sphere and analytic outside a compact set $E$ to be constant. The relevant concept here is the so-called continuous analytic capacity.
As far as I know, there is no nice characterization of sets of continous analytic capacity zero. If a set is removable for bounded analytic functions, then it is also removable for continuous functions. In particular, any set of zero one-dimensional Hausdorff measure is removable for continuous functions (this is an old theorem of Painlevé). A set which intersects any rectifiable curve in a set of zero one-dimensional Hausdorff measure will also be removable (this was conjectured by Vitushkin in the 1960's and proved by David in 1998).
However, there are sets removable for continuous functions analytic outside the set, but non-removable for bounded analytic functons. For instance, compact sets of $\sigma$-finite lengths are removable for continuous functions analytic outside the set (see the paper "On sufficient conditions for a function to be analytic and
on behavior of analytic functions in the neighborhood of non-isolated points" by Besicovitch). In particular, any rectifiable curve is removable for such functions.
Lastly, let me refer you to my answers in the following questions :
https://mathoverflow.net/questions/120118/when-does-continuity-imply-holomorphy/120122#120122
A bounded holomorphic function
best regards,
Malik
