postgresql/src
Tom Lane f97256570f Allow creation of C/POSIX collations without depending on libc behavior.
Most of our collations code has special handling for the locale names
"C" and "POSIX", allowing those collations to be used whether or not
the system libraries think those locale names are valid, or indeed
whether said libraries even have any locale support.  But we missed
handling things that way in CREATE COLLATION.  This meant you couldn't
clone the C/POSIX collations, nor explicitly define a new collation
using those locale names, unless the libraries allow it.  That's pretty
pointless, as well as being a violation of pg_newlocale_from_collation's
API specification.

The practical effect of this change is quite limited: it allows creating
such collations even on platforms that don't HAVE_LOCALE_T, and it allows
making "POSIX" collation objects on Windows, which before this would only
let you make "C" collation objects.  Hence, even though this is a bug fix
IMO, it doesn't seem worth the trouble to back-patch.

In passing, suppress the DROP CASCADE detail messages at the end of the
collation regression test.  I'm surprised we've never been bit by
message ordering issues there.

Per report from Murtuza Zabuawala.

Discussion: https://postgr.es/m/CAKKotZS-wcDcofXDCH=sidiuajE+nqHn2CGjLLX78anyDmi3gQ@mail.gmail.com
2017-08-01 13:51:05 -04:00
..
backend Allow creation of C/POSIX collations without depending on libc behavior. 2017-08-01 13:51:05 -04:00
bin Fix typo 2017-07-31 17:22:47 -04:00
common Update copyright in recently added files 2017-07-26 18:17:18 -04:00
fe_utils Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
include Fix comment. 2017-08-01 08:00:11 +09:00
interfaces Translation updates 2017-07-10 11:53:55 -04:00
makefiles Always use -fPIC, not -fpic, when building shared libraries with gcc. 2017-06-01 13:32:55 -04:00
pl Tighten coding for non-composite case in plperl's return_next. 2017-07-31 11:33:46 -04:00
port Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
template Remove "sco" and "unixware" ports. 2016-10-11 11:26:04 -04:00
test Allow creation of C/POSIX collations without depending on libc behavior. 2017-08-01 13:51:05 -04:00
timezone Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
tools PL/Perl portability fix: absorb relevant -D switches from Perl. 2017-07-28 14:25:28 -04:00
tutorial Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
.gitignore
DEVELOPERS
Makefile Remove redundant coverage target 2017-02-17 08:56:57 -05:00
Makefile.global.in PL/Perl portability fix: absorb relevant -D switches from Perl. 2017-07-28 14:25:28 -04:00
Makefile.shlib Remove support for bcc and msvc standalone libpq builds 2017-04-11 15:22:21 +02:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00