NEW: Make the module run under with PostGreSQL

This commit adds proper escaping so the module can be used when running the silverstripe postgresql database adapter.