Today I tested updating our website based on WordPress using a Postgresql database through the PG4WP driver. Unfortunately, it seems that the author doesn’t update it anymore since 2012. Version 3.9.1 of WordPress makes new functions calls to the database that are not handled by the original driver. I needed to tweak 2 parts of the code to make it work:

Disclaimer: I’m not using WordPress 3.9.3 by the moment, this is a theoretical solution based on my lecture of the code and generated error. Use it at your own risk. Use a test setup and test all functions you need before deploying this patch in a production!

SESSION.sql_mode is a way of getting the settings of MySQL. This won’t work on Postgresql.
You can try to bypass this check by modifying the file wp-includes/wp-db.php line 737:

Thanks @Vitorio. I made the changes that you suggested, and I’m no longer seeing the error. However, I’m seeing “Error establishing a database connection” in my web browser, with no errors logged anywhere else that I can find.