This patch adds PostGres test alongside with minor fix