Restore old pgwin32_message_to_UTF16() behavior outside transactions.
authorNoah Misch <noah@leadboat.com>
Sat, 15 Aug 2015 00:23:09 +0000 (20:23 -0400)
committerNoah Misch <noah@leadboat.com>
Sat, 15 Aug 2015 00:23:41 +0000 (20:23 -0400)
commitf988da953945136c8e511550226884dcbebe5b6b
tree11021199769f7d57d8225eb620a07088010cf3c1
parent3bfd40180859e252090f072805ec24b16c360f2f
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.
src/backend/utils/mb/mbutils.c