Integrated changes from http://vitoriodelage.wordpress.com/2014/06/06/add-missing-wpsql_errno-in-pg4wp-plugin/
Changes for 1.3.1 release

git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@969858 b8457f37-d9ea-0310-8a92-e5e31aec5664
Re-enabled error logging in trunk

git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@969861 b8457f37-d9ea-0310-8a92-e5e31aec5664