Restore old pgwin32_message_to_UTF16() behavior outside transactions.

Noah Misch <noah@leadboat.com>

Commit: f988da953945136c8e511550226884dcbebe5b6b
Author: Noah Misch <noah@leadboat.com>
Date: 2015-08-15T00:23:41Z
Releases: 9.4.5
Restore old pgwin32_message_to_UTF16() behavior outside transactions.

Commit 49c817eab78c6f0ce8c3bf46766b73d6cf3190b7 replaced with a hard
error the dubious pg_do_encoding_conversion() behavior when outside a
transaction.  Reintroduce the historic soft failure locally within
pgwin32_message_to_UTF16().  This fixes errors when writing messages in
less-common encodings to the Windows event log or console.  Back-patch
to 9.4, where the aforementioned commit first appeared.

Per bug #13427 from Dmitri Bourlatchkov.

Files

PathChange+/−
src/backend/utils/mb/mbutils.c modified +17 −7