some postgresql mods

Signed-off-by: Ilan Goldenstein <ilan.goldenstein@ravellosystems.com>