Fix pg boolean conversion

Test for merging PR #527 and #564