PostgreSQL fix for #1
Fixes #1