I'm working/familiar with the following defintion of a pole in $\mathbb{C}$:
Let $D\subset \mathbb{C}$ be an open domain and $f:D\to\mathbb{C}$ a function. $z_0\in\mathbb{C}$ is called a pole of $f$, if $\vert f(z)\vert\to\infty$ for $z\to z_0$.
Now I try to understand what it means for a point to be a pole on the Riemann sphere, but I have no rigorous definition for it (I do have a definition for being holomorphic at $\infty$). So let's expand the above definition to the Riemann sphere $\hat{\mathbb{C}}:=\mathbb{C}\cup\{\infty\}$, especially for the point $z_0=\infty$. We take the above definition, and apply it to $z_0=\infty$. When doing this, I always come to situations, where it seems to be problematic. Here is a simple example:
$f(z)=z$ on $\hat{\mathbb{C}}$, then $f(\infty)=\infty$. That means (by above definition) that $\infty$ is a pole of $f$. But I would expect $f$ to be entire in $\hat{\mathbb{C}}$.
Where is my mistake?
reference for the definition (page 4): https://analysis.math.uni-kiel.de/vorlesungen/meromorphic.17/Entire_Meromorphic.pdf