In the Bayesian Statistics, the use of conjugate prior distributions allows to obtain exact posterior quantities, avoiding the use of approximate methods. However, there are only a few conjugate structures available, which limits the use in practical problems. In this work we propose a general procedure to obtain the posterior distribution in an exact form in non-conjugate location parameter models with known (possibly, heteroskedastic) variance. The theory is based on special functions, specifically the H-function, which embraces most of the probability distributions. We express explicitly in a computable form all the Bayesian tools for posterior inferences, that is the posterior and the posterior predictive distributions and their moments, as well as the cumulative posterior distribution. As an illustration we consider a problem in astronomy of estimating the distance to the Large Magellanic Cloud, the largest galaxy now orbiting the Milky Way Galaxy.