Add a guard against uninitialized default locale

Started by Jeff Davis5 days ago1 messageshackers
Jump to latest
#1Jeff Davis
pgsql@j-davis.com

Not known to be reachable after dbf217c1c7, but defend against similar
issues in the future. For instance, an extension might encounter the
problem by calling pg_newlocale_from_collation(DEFAULT_COLLATION_OID)
from _PG_init(), and end up with a NULL pointer dereference.

Backport through 17, though patch is different in 17 (also attached).

Regards,
Jeff Davis

Attachments:

v1.19-0001-Guard-against-uninitialized-default-locale.patchtext/x-patch; charset=UTF-8; name=v1.19-0001-Guard-against-uninitialized-default-locale.patchDownload+6-1
v1.17-0001-Guard-against-uninitialized-default-locale.patchtext/x-patch; charset=UTF-8; name=v1.17-0001-Guard-against-uninitialized-default-locale.patchDownload+12-1