Definition of Riemann integral

I am trying to prove that we cannot use the definition of the Riemann integral as

$$\int_{a}^{b} f(x) dx = \lim_{n \rightarrow \infty} S_n$$ using the Dirichlet function. I don't know if my reasoning makes sense when I say we cannot use it as the definition because the values are not unique:

By the definition of the Riemann integral, we know that the Riemann integral $A = \int_{a}^{b} f(x) dx$ is unique for all functions $f$ and for all intervals $[a,b]$ s.t. $a,b, \in \mathbb{R}$. If we are to assume $\lim_{n \rightarrow \infty} S_n = \int_{a}^{b} f(x) dx$, $\lim_{n \rightarrow \infty} S_n$ must also be unique for all functions $f$ and for all intervals $[a,b]$ s.t. $a,b \in \mathbb{R}$.

Consider the function $f:[0,1] \rightarrow \mathbb{R}$ f(x) = \begin{cases} 1, & \text{if $x$ is rational} \\ 0, & \text{if $x$ is irrational} \end{cases} defined on the interval $[0,1]$. We know that for any partition $0 = x_0<x_1<x_2<x_3<....<x_N = 1$ of $[0,1]$, we can either choose the $x'_i$s to be either all rational, or all not, in which case the Riemann sums are respectively $1-0 =1$ or 0.As the condition holds for any partition, we have two values for $\lim_{n \rightarrow \infty } S_n$ if we let the number of divisions $N \rightarrow \infty$ and the width $d \rightarrow 0$. Therefore we see that although the Riemann integral $A$ has to be unique, the limit of the Riemann sum $\lim_{n \rightarrow \infty} S_n$ can have two values, depending on the intervals. Therefore the equality $\int_{a}^{b} f(x) dx = \lim_{n \rightarrow \infty} S_n$ does not hold for all functions and intervals.

You should know that f is said to be integrable (in the Riemann sense) if the limit of all the possible $S_{n}$ are exist and are the same value I, in this case we can state two things: the function f is integrable in the Riemann sense AND the value of its integral is that common limit I. So if there are at least two possible $S_{n}$ such that their limits exist and are not the same so this means that the function is not integrable. (Your reasoning would be true, if it is true that "any function is integrable and its integral it a unique value" but it is not the case!) There any many other kinds of integration (beside that of Riemann) one reason of their existence is that not all functions are integrable with respect to only one kind of integration.