Fixes a syntax error

The single quotes have to be escaped there to be interpreted by PGSQL, not PHP
Merge pull request #1407 from rbecheras/patch-4

Fixes a syntax error