Solution to Laplace equation in $\mathbb{R}^n$ 
Under what condition is there solution to Laplace equation with following conditions:
Let be $\Omega \subset \mathbb{R}^n$ open with regular boundary and $f \in C(\partial \Omega)$.
   Find $u\in C^2(\mathbb{R}^n)$ that
  \begin{align}
\Delta u(x) &= 0&x\in \mathbb{R}^n \\
u(x) &= f(x) &x\in \partial \Omega
\end{align}

It is well known that there is solution $u\in C^2(\Omega)$. But I'm interested in $C^2$ solution in whole space. It does not have to exist. 
Take for example $n=1$
$$ \Omega = (-2,-1)\cup(1,2)$$ $$f(-2)=f(2)=0$$$$ f(-1)=f(1)=1$$
Than the only candidate for solution is 
\begin{align}
u(x) &= 1  &x\in [-1,1] \\
u(x) &= 2-|x| &x\in \mathbb{R}\setminus (-1,1) \\
\end{align}
which does not have first derivative at points $-1,1$
I came up with condition that $\partial \Omega$ has to be retract of $\Omega^c$. By retract I mean that there is 
$$
H(x,t):\partial \Omega \times [0,1) \rightarrow \Omega^c
$$$$
H(x,0) = x
$$$$
H \text{ is diffeomorphism}
$$
I can first solve Laplace equation in $\Omega$ then I know normal derivatives of $u$ at $\partial \Omega$ so I can look at Laplace equation in $\Omega^c$ as time equation
$$
\frac{\partial^2 u}{\partial t^2} = - \nabla \cdot( A \nabla u )
$$
in $\partial \Omega \times [0,1)$. Where $A$ pops out when you pull the equation from $\Omega^c$ to $\partial \Omega \times [0,1)$.
Problem is that I know very little about equation $\partial_{tt} u = - \Delta u$. It looks like wave equation except the sign. To get a little grasp of this equation I tried to calculate solution in $\mathbb{R}\times [0,\infty)$ with Fourier transform.
\begin{align}
\partial_{tt} u &= - \partial_{xx} u \\
u(x,0) &= f(x) \\
\partial_t u(x,0) &= g(x)
\end{align}
after Fourier transform
\begin{align}
\partial_{tt} \hat u &= \omega^2 \hat u \\
\hat u(\omega,0) &= \hat f(\omega) \\
\partial_t \hat u(\omega,0) &= \hat g(\omega)
\end{align}
solution is
$$
\hat u(\omega,t) = \frac{\sinh(\omega t)}{\omega} \hat g(\omega) + \cosh(\omega t) \hat f(\omega)
$$
This gives quite crude restriction on $\hat g, \hat f$, they should decay faster than exponential. Than we can transform $\hat u$ back and obtain solution. I guess when I work on $\partial \Omega \times [0,1)$ for $\Omega$ bounded than I would not encounter such integration problems so $f,g$ could be any continuous functions. I don't know how to proof that. 
The question is: Is my condition that $\partial \Omega$ is retract of $\Omega^c$ sufficient condition for existence of solution? 
 A: Apart from the geometry of $\partial \Omega$, the boundary values $f$ would have to be very exceptional. Indeed, a harmonic function on $\mathbb R^n$ is real-analytic on $\mathbb R^n$, and this confers a lot of rigidity on the values it can attain on $\partial \Omega$. 
For example, let $\Omega$ be the unit disk in $\mathbb R^2$. Expand $f$ into Fourier series $f(\theta)\sim \sum_{n\in\mathbb Z} c_n e^{in\theta}$. (The series need not converge; so far this is a formal expansion.) Then in $\Omega$   the (unique) solution of the Dirichlet problem is given by 
$$u(r,\theta) = \sum_{n\in\mathbb Z} c_n r^{|n|} e^{in\theta} \tag{1}$$
If $u$ extends to a harmonic  function on all of $\mathbb R^2$, then it must be represented by the series (1) on all of $\mathbb R^2$ (indeed, write $u$ as the real part of holomorphic function; that function must be entire). Which implies that the sequence $c_n$ is rapidly decaying on both ends: 
$$\lim_{|n|\to \infty}  R^{|n|}c_n = 0 \quad \forall\ R>0 \tag{2}$$
This requires $f$ to be analytic and more. Conversely, if (2) holds, then (1) solves your problem in all of $\mathbb R$. 
If $\Omega$ does not have a nice boundary, the rigidity is still there ($f$ has to be very special), but it's no longer feasible to describe what "special" is, without tautologies.
