Implement CMS PR 3279

Bugfix for postgres db driver