Bug 773464 - add proper support for postgresql