suppressed a clang warning and also refactoried the code for pgsql string quoting a bit.