Sum over characters Take $x>0$ large, $t\in \mathbb R$, $q\in \mathbb N$ and a non-principal character $\chi $ mod $q$.  If you want, take $t\leq x$.  How do I bound
\[ \sum _{n\leq x}\frac {\chi (n)}{n^{it}}?\]
My guess was that this is $\ll \sqrt {qt}$, based on thinking about the $q=1$ case, which is the relatively well known statement
\[ \sum _{n\leq x}\frac {1}{n^{it}}=\text {main term }+\mathcal O\left (1\right ).\]
Euler-Maclaurin and Polya-Vinogradov shows the sum in question to be $\ll t\sqrt q$, which is too weak.  But in the $q=1$ case EM may be combined with Van der Corput's summation formula to get an $\mathcal O(1)$ bound.  If I try to replicate that argument, I get stuck since I don't know how to bound (for $a\in \mathbb N$ with $(a,q)=1$)
\[ \int _x^\infty \frac {e(ua/q)du}{u^{it}}\]
One idea would be with complex analysis: Perron's formula says for some $c>1$ and any $T>0$ the sum is (the error terms really only being "essentially" as small as stated)
$$\int _{c\pm iT}\frac {L_{\chi }(s+it)ds}{s}+\mathcal O\left (x/T\right )$$ 
where by the Residue Theorem the main term is, for some $0<c'<1$,
$$\int _{c'\pm iT}\frac {L_{\chi }(s+it)x^sds}{s}
+\int _{c'+iT}^{c+iT}\frac {L_{\chi }(s+it)x^sds}{s}+(\text { similar integral }).$$
Taking absolute values gives a total error something like $$\ll x/T+\sqrt (T+|t|)$$ which is also too large.  But explicitly computing the vertical integral via the functional equation seems to get better bounds, and give my required result.
 A: Instead of using van der Corput, why don't you express the sum as a complex integral?
To simplify matters, consider a smooth sum, i.e.,
$$S(x,t) = \sum_n f(n/x) n^{-i t},$$
where $f$ is fixed $C^\infty$ function of compact support (though of course much weaker conditions suffice), with $f(x)=1$ for $0\leq x\leq 1/2$, say, so that you are studying essentially the same sum as before. Then
$$S(x,t) = \frac{1}{2 \pi i} \int_{\sigma - i \infty}^{\sigma + i \infty} x^s M f(s) L(s+i t,\chi) ds$$
for $\sigma>1$.
Now displace the integral all the way to the left of the $y$-axis. You'll pick up a pole at $s=0$ (coming from $M f(s)$). Bound $|L(i t)|$ using the functional equation and the bound $|L(1+ i t,\chi)|\ll \log q t$ (valid for $|t|\gg 1$; see, e.g., Montgomery-Vaughan, Thm. 11.4). There is indeed a factor of essentially $\sqrt{q t}$ coming from the functional equation. The dominant term of the bound will thus be $O(\sqrt{q t} \log q t)$.
(If we knew $L(s,\chi)$ has no real zeroes $\sigma$ with $\sigma>1/2$, it would be $O(\sqrt{q t} \log \log q t)$, by the bound in op. cit., exercise 13.2.6.)
