forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf972565
committed
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 notthe system libraries think those locale names are valid, or indeedwhether said libraries even have any locale support. But we missedhandling things that way in CREATE COLLATION. This meant you couldn'tclone the C/POSIX collations, nor explicitly define a new collationusing those locale names, unless the libraries allow it. That's prettypointless, as well as being a violation of pg_newlocale_from_collation'sAPI specification.The practical effect of this change is quite limited: it allows creatingsuch collations even on platforms that don't HAVE_LOCALE_T, and it allowsmaking "POSIX" collation objects on Windows, which before this would onlylet you make "C" collation objects. Hence, even though this is a bug fixIMO, it doesn't seem worth the trouble to back-patch.In passing, suppress the DROP CASCADE detail messages at the end of thecollation regression test. I'm surprised we've never been bit bymessage ordering issues there.Per report from Murtuza Zabuawala.Discussion:https://postgr.es/m/CAKKotZS-wcDcofXDCH=sidiuajE+nqHn2CGjLLX78anyDmi3gQ@mail.gmail.com1 parentb21c569 commitf972565
File tree
3 files changed
+33
-20
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+33
-20
lines changedLines changed: 8 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
214 | 214 |
| |
215 | 215 |
| |
216 | 216 |
| |
217 |
| - | |
218 |
| - | |
219 |
| - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
220 | 221 |
| |
221 |
| - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
222 | 226 |
| |
223 | 227 |
| |
224 | 228 |
| |
|
Lines changed: 13 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
622 | 622 |
| |
623 | 623 |
| |
624 | 624 |
| |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
625 | 636 |
| |
626 | 637 |
| |
627 | 638 |
| |
| |||
650 | 661 |
| |
651 | 662 |
| |
652 | 663 |
| |
| 664 | + | |
653 | 665 |
| |
654 |
| - | |
655 |
| - | |
656 |
| - | |
657 |
| - | |
658 |
| - | |
659 |
| - | |
660 |
| - | |
661 |
| - | |
662 |
| - | |
663 |
| - | |
664 |
| - | |
665 |
| - | |
666 |
| - | |
667 |
| - | |
668 |
| - | |
669 |
| - | |
| 666 | + |
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
229 | 229 |
| |
230 | 230 |
| |
231 | 231 |
| |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
232 | 243 |
| |
233 | 244 |
| |
234 | 245 |
| |
| |||
246 | 257 |
| |
247 | 258 |
| |
248 | 259 |
| |
| 260 | + | |
249 | 261 |
|
0 commit comments
Comments
(0)