The question
Given independent random variables $$X_1,\cdots,X_n \sim N(\theta,\phi)$$
with joint prior density $$\pi(\theta,\phi)\propto \frac1\phi$$
Show that the posterior distribution of $t(\theta)=\frac{\sqrt n}{s}(\theta - \bar x)$ follows a $t$-distribution
What I have done so far
I have found the posterior density to be
$$\pi(\theta,\phi | \vec x ) \propto \phi^{-\frac n2-1} \exp \biggl [-\frac{1}{2\phi}\biggl((n-1)s^2+n(\bar x-\theta)^2\biggr)\biggr] $$
where $$s^2=\frac{1}{n-1}\sum_{i=1}^{n}(x_i-\bar x)^2$$
Integrating over $\phi \in (0,\infty)$ with reference to the Inverse Gamma distribution, we get the marginal distribution of $\theta$
$$\pi(\theta|\vec x) \propto \biggl(\frac{2}{(n-1)s^2+n(\bar x-\theta)^2}\biggr)^{n/2}$$
And then I am stuck...
For reference
The posterior density $\pi(\theta,\phi|\vec x)$ is certainly correct because it was given in the question.
Inverse gamma distribution with parameters $(\alpha,\beta)$:
$$f(y)=\frac{\beta^\alpha}{\Gamma(\alpha)y^{\alpha+1}}e^{-\beta/y} \; \; \; \; \; y>0$$
$t$-distribution with parameter $r$:
$$f(y) \propto \biggl(1+\frac{y^2}{r}\biggr)^{-\frac{r+1}{2}} \; \; \; \; y \in \Bbb R$$