Asymptotics of sums of Dirichlet-Characters over prime numbers Again in relation with some stuff I am currently reading, the authors make use of the following "standard argument in prime number theory":
Let $\chi$ be a non-principal Dirichlet-character. Then
$$\sum_{y< p \leq x} \chi(p)\overline{\chi(p)}=\frac{x}{\log(x)}+ o\left(\frac{x}{\log(x)}\right),$$
when $x\to\infty$, where $p$ runs over prime numbers. This expression very much reminds of Polya's inequality plus some use of character orthogonality, but I don't see how to "restrict" the sum to only prime numbers.
I would be thankful if someone could point to the way how this is derived. As usual, references are most welcome!

Let $m$ be the conductor of $\chi$, $\omega(m)$ its number of prime divisors and $q$ the largest prime dividing it - then for $x\ge q$ the sum is precisely $\pi(x)-\omega(m)$, because $|\chi|^2$ is always either $1$ or $0$, and is only the latter for numbers that share common divisors with $m$. The only primes that share common divisors with $m$ are those that divide it, and there are $\omega(m)$ of those (a finite amount), so all other prime numbers will contribute exactly $1$ to the overall sum. This means that $\sum\sim x/\log x$ by the prime number theorem, which gives the identity.
