Fixed Bug #64949 (Buffer overflow in _pdo_pgsql_error)

There is a lot of call such as:
	pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "Copy command failed");
Where the 3rd paramater is a error message string where a sqlstate (5 chars)
is expected. This cause a segfault in copy_from.phpt and copy_to.phpt.

This is only a sanity check to avoid buffer overflow, but obviously this
calls need to be fixed (using NULL or a correct sqlstate).
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fixed Bug #64949 (Buffer overflow in _pdo_pgsql_error)
NEWS
Fixed bug #64037 (wrong value returned when using a negative numeric field equal to the scale)
Fixed bug #62024 (unable to run consecutive prepared querys with null values)

Credits to james@kenjim.com for the patch.
Slightly edited tests and fix for bug #62024
NEWS
Merge branch 'pull-request/309' into PHP-5.3
Merge branch 'PHP-5.3' into PHP-5.4
Fixed bug #62857 (bytea test failures)

Postgres 9.1+ test fixes. Tests were failing due to the default
standard_conforming_strings GUC being changed to on. Also the
pg_escape_bytea test was encoding the data before estabilishing
a connection, thus falling back to the old escaping type which
isn't properly handled by the backend when using a default
configuration.

I haven't updated the NEWS file as it's just test fixes.
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fixed bug #62857 (bytea test failures)
Fixed bug #64609 (pg_convert enum type support)
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fixed bug #64609 (pg_convert enum type support)
Fix PDO::inTransaction() test for pgsql

inTransaction() nowadays casts the in_transaction result to boolean.
I'm not sure whether the INERROR state should result in true or false.
For now I went with the result that we actually get.
Improved test portability so that it doesn't fail with pdo_pgsql
Clean up leftover test files
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Clean up leftover test files
Fix PDO_DBLIB bugs: #64338, #64808, #63638

Synchronize with master
news for dblib fixes
fix CVE-2013-2110 - use correct formula to calculate string size