fix for postgresql compatibility
Merge pull request #138 from makroxyz/pgsql-fix

fix for postgresql compatibility