Fixes bug 870092 - Added raised exception in postgres methods.

@rhelmer r?