Extending continuous function from a dense set If $X$ is a metric space and $Y$ a complete metric space. Let $A$ be a dense subset of $X$. If there is a uniformly continuous function $f$ from $A$ to $Y$, it can be uniquely extended to a uniformly continuous function $g$ from $X$ to $Y$. I was trying to think of an example of a pointwise continuous function from set a rational numbers $Q$ to real line $R$ which cannot be extended to a continuous function $R$ to $R$. But could not get anywhere.

Define $f:\mathbb{Q}\to\mathbb{R}$ by $f(x)=0$ if $x<\sqrt{2}$ and $f(x)=1$ if $x>\sqrt{2}$.  Then $f$ is continuous, but cannot be continuously extended to $\sqrt{2}$.
