This patch adds PostGres test alongside with minor fix (#1292 substituti...

...on)

This patch adds PostGres test database alongside with minor fix...