You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<
10000
script type="application/json" data-target="react-app.embeddedData">{"payload":{"commit":{"oid":"8240401437c8e261b4ae95fcc4183db98339cc9e","url":"/postgres/postgres/commit/8240401437c8e261b4ae95fcc4183db98339cc9e","authoredDate":"2024-07-29T15:15:11.000-07:00","committedDate":"2024-07-29T15:18:06.000-07:00","shortMessage":null,"shortMessageMarkdown":"\u003cdiv\u003eDo not return NULL from pg_newlocale_from_collation().\u003c/div\u003e","shortMessageMarkdownLink":null,"bodyMessageHtml":"Previously, pg_newlocale_from_collation() returned NULL as a special\ncase for the DEFAULT_COLLATION_OID if the provider was libc. In that\ncase the behavior would depend on the last call to setlocale().\n\nNow, consistent with the other providers, it will return a pointer to\ndefault_locale, which is not dependent on setlocale().\n\nNote: for the C and POSIX locales, the locale_t structure within the\npg_locale_t will still be zero, because those locales are implemented\nwith internal logic and do not use libc at all.\n\nlc_collate_is_c() and lc_ctype_is_c() still depend on setlocale() to\ndetermine the current locale, which will be removed in a subsequent\ncommit.\n\nDiscussion: \u003ca href=\"https://postgr.es/m/cfd9eb85-c52a-4ec9-a90e-a5e4de56e57d@eisentraut.org\" rel=\"nofollow\"\u003ehttps://postgr.es/m/cfd9eb85-c52a-4ec9-a90e-a5e4de56e57d@eisentraut.org\u003c/a\u003e\nReviewed-by: Peter Eisentraut, Andreas Karlsson","authors":[{"login":"jeff-davis","displayName":"Jeff Davis","avatarUrl":"https://avatars.githubusercontent.com/u/214386?v=4","path":"/jeff-davis","isGitHub":false}],"committerAttribution":false,"committer":{"login":"jeff-davis","displayName":"Jeff Davis","avatarUrl":"https://avatars.githubusercontent.com/u/214386?v=4","path":"/jeff-davis","isGitHub":false},"parents":["6a1d8cef46e654bdc645e9c32412f707471aff2a"],"globalRelayId":"C_kwDOAA4m0toAKDgyNDA0MDE0MzdjOGUyNjFiNGFlOTVmY2M0MTgzZGI5ODMzOWNjOWU","sha1":"6a1d8cef46e654bdc645e9c32412f707471aff2a","sha2":"8240401437c8e261b4ae95fcc4183db98339cc9e"},"currentUser":null,"repo":{"id":927442,"defaultBranch":"master","name":"postgres","ownerLogin":"postgres","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2010-09-21T11:35:45.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/177543?v=4","public":true,"private":false,"isOrgOwned":true},"diffEntryData":[{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":1460,"text":"@@ -1461,6 +1461,103 @@ lc_ctype_is_c(Oid collation)","html":"@@ -1461,6 +1461,103 @@ lc_ctype_is_c(Oid collation)","displayNoNewLineWarning":false,"position":0,"left":1460,"right":1460},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1461,"text":" \treturn (lookup_collation_cache(collation, true))-\u003ectype_is_c;","html":" \t\u003cspan class=pl-k\u003ereturn\u003c/span\u003e (\u003cspan class=pl-en\u003elookup_collation_cache\u003c/span\u003e(\u003cspan class=pl-s1\u003ecollation\u003c/span\u003e, true))\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ectype_is_c\u003c/span\u003e;","displayNoNewLineWarning":false,"position":1,"left":1461,"right":1461},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1462,"text":" }","html":" }","displayNoNewLineWarning":false,"position":2,"left":1462,"right":1462},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1463,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":3,"left":1463,"right":1463},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1464,"text":"+/* simple subroutine for reporting errors from newlocale() */","html":"+\u003cspan class=pl-c\u003e/* simple subroutine for reporting errors from newlocale() */\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":1463,"right":1464},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1465,"text":"+static void","html":"+\u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":1463,"right":1465},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1466,"text":"+report_newlocale_failure(const char *localename)","html":"+\u003cspan class=pl-en\u003ereport_newlocale_failure\u003c/span\u003e(\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003elocalename\u003c/span\u003e)","displayNoNewLineWarning":false,"position":6,"left":1463,"right":1466},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1467,"text":"+{","html":"+{","displayNoNewLineWarning":false,"position":7,"left":1463,"right":1467},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1468,"text":"+\tint\t\t\tsave_errno;","html":"+\t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003esave_errno\u003c/span\u003e;","displayNoNewLineWarning":false,"position":8,"left":1463,"right":1468},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1469,"text":"+","html":"+","displayNoNewLineWarning":false,"position":9,"left":1463,"right":1469},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1470,"text":"+\t/*","html":"+\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":10,"left":1463,"right":1470},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1471,"text":"+\t * Windows doesn't provide any useful error indication from","html":"+\u003cspan class=pl-c\u003e\t * Windows doesn\u0026#39;t provide any useful error indication from\u003c/span\u003e","displayNoNewLineWarning":false,"position":11,"left":1463,"right":1471},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1472,"text":"+\t * _create_locale(), and BSD-derived platforms don't seem to feel they","html":"+\u003cspan class=pl-c\u003e\t * _create_locale(), and BSD-derived platforms don\u0026#39;t seem to feel they\u003c/span\u003e","displayNoNewLineWarning":false,"position":12,"left":1463,"right":1472},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1473,"text":"+\t * need to set errno either (even though POSIX is pretty clear that","html":"+\u003cspan class=pl-c\u003e\t * need to set errno either (even though POSIX is pretty clear that\u003c/span\u003e","displayNoNewLineWarning":false,"position":13,"left":1463,"right":1473},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1474,"text":"+\t * newlocale should do so). So, if errno hasn't been set, assume ENOENT","html":"+\u003cspan class=pl-c\u003e\t * newlocale should do so). So, if errno hasn\u0026#39;t been set, assume ENOENT\u003c/span\u003e","displayNoNewLineWarning":false,"position":14,"left":1463,"right":1474},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1475,"text":"+\t * is what to report.","html":"+\u003cspan class=pl-c\u003e\t * is what to report.\u003c/span\u003e","displayNoNewLineWarning":false,"position":15,"left":1463,"right":1475},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1476,"text":"+\t */","html":"+\u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":16,"left":1463,"right":1476},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1477,"text":"+\tif (errno == 0)","html":"+\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003eerrno\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":17,"left":1463,"right":1477},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1478,"text":"+\t\terrno = ENOENT;","html":"+\t\t\u003cspan class=pl-s1\u003eerrno\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eENOENT\u003c/span\u003e;","displayNoNewLineWarning":false,"position":18,"left":1463,"right":1478},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1479,"text":"+","html":"+","displayNoNewLineWarning":false,"position":19,"left":1463,"right":1479},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1480,"text":"+\t/*","html":"+\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":20,"left":1463,"right":1480},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1481,"text":"+\t * ENOENT means \"no such locale\", not \"no such file\", so clarify that","html":"+\u003cspan class=pl-c\u003e\t * ENOENT means \u0026quot;no such locale\u0026quot;, not \u0026quot;no such file\u0026quot;, so clarify that\u003c/span\u003e","displayNoNewLineWarning":false,"position":21,"left":1463,"right":1481},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1482,"text":"+\t * errno with an errdetail message.","html":"+\u003cspan class=pl-c\u003e\t * errno with an errdetail message.\u003c/span\u003e","displayNoNewLineWarning":false,"position":22,"left":1463,"right":1482},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1483,"text":"+\t */","html":"+\u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":23,"left":1463,"right":1483},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1484,"text":"+\tsave_errno = errno;\t\t\t/* auxiliary funcs might change errno */","html":"+\t\u003cspan class=pl-s1\u003esave_errno\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eerrno\u003c/span\u003e;\t\t\t\u003cspan class=pl-c\u003e/* auxiliary funcs might change errno */\u003c/span\u003e","displayNoNewLineWarning":false,"position":24,"left":1463,"right":1484},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1485,"text":"+\tereport(ERROR,","html":"+\t\u003cspan class=pl-en\u003eereport\u003c/span\u003e(\u003cspan class=pl-c1\u003eERROR\u003c/span\u003e,","displayNoNewLineWarning":false,"position":25,"left":1463,"right":1485},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1486,"text":"+\t\t\t(errcode(ERRCODE_INVALID_PARAMETER_VALUE),","html":"+\t\t\t(\u003cspan class=pl-en\u003eerrcode\u003c/span\u003e(\u003cspan class=pl-c1\u003eERRCODE_INVALID_PARAMETER_VALUE\u003c/span\u003e),","displayNoNewLineWarning":false,"position":26,"left":1463,"right":1486},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1487,"text":"+\t\t\t errmsg(\"could not create locale \\\"%s\\\": %m\",","html":"+\t\t\t \u003cspan class=pl-en\u003eerrmsg\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026quot;could not create locale \\\u0026quot;%s\\\u0026quot;: %m\u0026quot;\u003c/span\u003e,","displayNoNewLineWarning":false,"position":27,"left":1463,"right":1487},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1488,"text":"+\t\t\t\t\tlocalename),","html":"+\t\t\t\t\t\u003cspan class=pl-s1\u003elocalename\u003c/span\u003e),","displayNoNewLineWarning":false,"position":28,"left":1463,"right":1488},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1489,"text":"+\t\t\t (save_errno == ENOENT ?","html":"+\t\t\t (\u003cspan class=pl-s1\u003esave_errno\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003eENOENT\u003c/span\u003e ?","displayNoNewLineWarning":false,"position":29,"left":1463,"right":1489},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1490,"text":"+\t\t\t errdetail(\"The operating system could not find any locale data for the locale name \\\"%s\\\".\",","html":"+\t\t\t \u003cspan class=pl-en\u003eerrdetail\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026quot;The operating system could not find any locale data for the locale name \\\u0026quot;%s\\\u0026quot;.\u0026quot;\u003c/span\u003e,","displayNoNewLineWarning":false,"position":30,"left":1463,"right":1490},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1491,"text":"+\t\t\t\t\t\tlocalename) : 0)));","html":"+\t\t\t\t\t\t\u003cspan class=pl-s1\u003elocalename\u003c/span\u003e) : \u003cspan class=pl-c1\u003e0\u003c/span\u003e)));","displayNoNewLineWarning":false,"position":31,"left":1463,"right":1491},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1492,"text":"+}","html":"+}","displayNoNewLineWarning":false,"position":32,"left":1463,"right":1492},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1493,"text":"+","html":"+","displayNoNewLineWarning":false,"position":33,"left":1463,"right":1493},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1494,"text":"+/*","html":"+\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":34,"left":1463,"right":1494},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1495,"text":"+ * Initialize the locale_t field.","html":"+\u003cspan class=pl-c\u003e * Initialize the locale_t field.\u003c/span\u003e","displayNoNewLineWarning":false,"position":35,"left":1463,"right":1495},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1496,"text":"+ *","html":"+\u003cspan class=pl-c\u003e *\u003c/span\u003e","displayNoNewLineWarning":false,"position":36,"left":1463,"right":1496},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1497,"text":"+ * The \"C\" and \"POSIX\" locales are not actually handled by libc, so set the","html":"+\u003cspan class=pl-c\u003e * The \u0026quot;C\u0026quot; and \u0026quot;POSIX\u0026quot; locales are not actually handled by libc, so set the\u003c/span\u003e","displayNoNewLineWarning":false,"position":37,"left":1463,"right":1497},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1498,"text":"+ * locale_t to zero in that case.","html":"+\u003cspan class=pl-c\u003e * locale_t to zero in that case.\u003c/span\u003e","displayNoNewLineWarning":false,"position":38,"left":1463,"right":1498},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1499,"text":"+ */","html":"+\u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":39,"left":1463,"right":1499},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1500,"text":"+static void","html":"+\u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e","displayNoNewLineWarning":false,"position":40,"left":1463,"right":1500},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1501,"text":"+make_libc_collator(const char *collate, const char *ctype,","html":"+\u003cspan class=pl-en\u003emake_libc_collator\u003c/span\u003e(\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ecollate\u003c/span\u003e, \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ectype\u003c/span\u003e,","displayNoNewLineWarning":false,"position":41,"left":1463,"right":1501},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1502,"text":"+\t\t\t\t pg_locale_t result)","html":"+\t\t\t\t \u003cspan class=pl-smi\u003epg_locale_t\u003c/span\u003e \u003cspan class=pl-s1\u003eresult\u003c/span\u003e)","displayNoNewLineWarning":false,"position":42,"left":1463,"right":1502},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1503,"text":"+{","html":"+{","displayNoNewLineWarning":false,"position":43,"left":1463,"right":1503},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1504,"text":"+\tlocale_t\tloc = 0;","html":"+\t\u003cspan class=pl-smi\u003elocale_t\u003c/span\u003e\t\u003cspan class=pl-s1\u003eloc\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":44,"left":1463,"right":1504},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1505,"text":"+","html":"+","displayNoNewLineWarning":false,"position":45,"left":1463,"right":1505},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1506,"text":"+\tif (strcmp(collate, ctype) == 0)","html":"+\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003estrcmp\u003c/span\u003e(\u003cspan class=pl-s1\u003ecollate\u003c/span\u003e, \u003cspan class=pl-s1\u003ectype\u003c/span\u003e) \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":46,"left":1463,"right":1506},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1507,"text":"+\t{","html":"+\t{","displayNoNewLineWarning":false,"position":47,"left":1463,"right":1507},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1508,"text":"+\t\tif (strcmp(ctype, \"C\") != 0 \u0026\u0026 strcmp(ctype, \"POSIX\") != 0)","html":"+\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003estrcmp\u003c/span\u003e(\u003cspan class=pl-s1\u003ectype\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026quot;C\u0026quot;\u003c/span\u003e) \u003cspan class=pl-c1\u003e!=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e \u003cspan class=pl-en\u003estrcmp\u003c/span\u003e(\u003cspan class=pl-s1\u003ectype\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026quot;POSIX\u0026quot;\u003c/span\u003e) \u003cspan class=pl-c1\u003e!=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":48,"left":1463,"right":1508},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1509,"text":"+\t\t{","html":"+\t\t{","displayNoNewLineWarning":false,"position":49,"left":1463,"right":1509},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1510,"text":"+\t\t\t/* Normal case where they're the same */","html":"+\t\t\t\u003cspan class=pl-c\u003e/* Normal case where they\u0026#39;re the same */\u003c/span\u003e","displayNoNewLineWarning":false,"position":50,"left":1463,"right":1510},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1511,"text":"+\t\t\terrno = 0;","html":"+\t\t\t\u003cspan class=pl-s1\u003eerrno\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":51,"left":1463,"right":1511},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1512,"text":"+#ifndef WIN32","html":"+\u003cspan class=pl-k\u003e#ifndef\u003c/span\u003e \u003cspan class=pl-c1\u003eWIN32\u003c/span\u003e","displayNoNewLineWarning":false,"position":52,"left":1463,"right":1512},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1513,"text":"+\t\t\tloc = newlocale(LC_COLLATE_MASK | LC_CTYPE_MASK, collate,","html":"+\t\t\t\u003cspan class=pl-s1\u003eloc\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003enewlocale\u003c/span\u003e(\u003cspan class=pl-c1\u003eLC_COLLATE_MASK\u003c/span\u003e | \u003cspan class=pl-c1\u003eLC_CTYPE_MASK\u003c/span\u003e, \u003cspan class=pl-s1\u003ecollate\u003c/span\u003e,","displayNoNewLineWarning":false,"position":53,"left":1463,"right":1513},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1514,"text":"+\t\t\t\t\t\t\tNULL);","html":"+\t\t\t\t\t\t\t\u003cspan class=pl-c1\u003eNULL\u003c/span\u003e);","displayNoNewLineWarning":false,"position":54,"left":1463,"right":1514},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1515,"text":"+#else","html":"+\u003cspan class=pl-k\u003e#else\u003c/span\u003e","displayNoNewLineWarning":false,"position":55,"left":1463,"right":1515},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1516,"text":"+\t\t\tloc = _create_locale(LC_ALL, collate);","html":"+\t\t\t\u003cspan class=pl-s1\u003eloc\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003e_create_locale\u003c/span\u003e(\u003cspan class=pl-c1\u003eLC_ALL\u003c/span\u003e, \u003cspan class=pl-s1\u003ecollate\u003c/span\u003e);","displayNoNewLineWarning":false,"position":56,"left":1463,"right":1516},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1517,"text":"+#endif","html":"+\u003cspan class=pl-k\u003e#endif\u003c/span\u003e","displayNoNewLineWarning":false,"position":57,"left":1463,"right":1517},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1518,"text":"+\t\t\tif (!loc)","html":"+\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (!\u003cspan class=pl-s1\u003eloc\u003c/span\u003e)","displayNoNewLineWarning":false,"position":58,"left":1463,"right":1518},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1519,"text":"+\t\t\t\treport_newlocale_failure(collate);","html":"+\t\t\t\t\u003cspan class=pl-en\u003ereport_newlocale_failure\u003c/span\u003e(\u003cspan class=pl-s1\u003ecollate\u003c/span\u003e);","displayNoNewLineWarning":false,"position":59,"left":1463,"right":1519},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1520,"text":"+\t\t}","html":"+\t\t}","displayNoNewLineWarning":false,"position":60,"left":1463,"right":1520},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1521,"text":"+\t}","html":"+\t}","displayNoNewLineWarning":false,"position":61,"left":1463,"right":1521},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1522,"text":"+\telse","html":"+\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e","displayNoNewLineWarning":false,"position":62,"left":1463,"right":1522},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1523,"text":"+\t{","html":"+\t{","displayNoNewLineWarning":false,"position":63,"left":1463,"right":1523},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1524,"text":"+#ifndef WIN32","html":"+\u003cspan class=pl-k\u003e#ifndef\u003c/span\u003e \u003cspan class=pl-c1\u003eWIN32\u003c/span\u003e","displayNoNewLineWarning":false,"position":64,"left":1463,"right":1524},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1525,"text":"+\t\t/* We need two newlocale() steps */","html":"+\t\t\u003cspan class=pl-c\u003e/* We need two newlocale() steps */\u003c/span\u003e","displayNoNewLineWarning":false,"position":65,"left":1463,"right":1525},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1526,"text":"+\t\tlocale_t\tloc1 = 0;","html":"+\t\t\u003cspan class=pl-smi\u003elocale_t\u003c/span\u003e\t\u003cspan class=pl-s1\u003eloc1\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":66,"left":1463,"right":1526},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1527,"text":"+","html":"+","displayNoNewLineWarning":false,"position":67,"left":1463,"right":1527},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1528,"text":"+\t\tif (strcmp(collate, \"C\") != 0 \u0026\u0026 strcmp(collate, \"POSIX\") != 0)","html":"+\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003estrcmp\u003c/span\u003e(\u003cspan class=pl-s1\u003ecollate\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026quot;C\u0026quot;\u003c/span\u003e) \u003cspan class=pl-c1\u003e!=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e \u003cspan class=pl-en\u003estrcmp\u003c/span\u003e(\u003cspan class=pl-s1\u003ecollate\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026quot;POSIX\u0026quot;\u003c/span\u003e) \u003cspan class=pl-c1\u003e!=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":68,"left":1463,"right":1528},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1529,"text":"+\t\t{","html":"+\t\t{","displayNoNewLineWarning":false,"position":69,"left":1463,"right":1529},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1530,"text":"+\t\t\terrno = 0;","html":"+\t\t\t\u003cspan class=pl-s1\u003eerrno\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":70,"left":1463,"right":1530},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1531,"text":"+\t\t\tloc1 = newlocale(LC_COLLATE_MASK, collate, NULL);","html":"+\t\t\t\u003cspan class=pl-s1\u003eloc1\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003enewlocale\u003c/span\u003e(\u003cspan class=pl-c1\u003eLC_COLLATE_MASK\u003c/span\u003e, \u003cspan class=pl-s1\u003ecollate\u003c/span\u003e, \u003cspan class=pl-c1\u003eNULL\u003c/span\u003e);","displayNoNewLineWarning":false,"position":71,"left":1463,"right":1531},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1532,"text":"+\t\t\tif (!loc1)","html":"+\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (!\u003cspan class=pl-s1\u003eloc1\u003c/span\u003e)","displayNoNewLineWarning":false,"position":72,"left":1463,"right":1532},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1533,"text":"+\t\t\t\treport_newlocale_failure(collate);","html":"+\t\t\t\t\u003cspan class=pl-en\u003ereport_newlocale_failure\u003c/span\u003e(\u003cspan class=pl-s1\u003ecollate\u003c/span\u003e);","displayNoNewLineWarning":false,"position":73,"left":1463,"right":1533},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1534,"text":"+\t\t}","html":"+\t\t}","displayNoNewLineWarning":false,"position":74,"left":1463,"right":1534},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1535,"text":"+","html":"+","displayNoNewLineWarning":false,"position":75,"left":1463,"right":1535},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1536,"text":"+\t\tif (strcmp(ctype, \"C\") != 0 \u0026\u0026 strcmp(ctype, \"POSIX\") != 0)","html":"+\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003estrcmp\u003c/span\u003e(\u003cspan class=pl-s1\u003ectype\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026quot;C\u0026quot;\u003c/span\u003e) \u003cspan class=pl-c1\u003e!=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e \u003cspan class=pl-en\u003estrcmp\u003c/span\u003e(\u003cspan class=pl-s1\u003ectype\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026quot;POSIX\u0026quot;\u003c/span\u003e) \u003cspan class=pl-c1\u003e!=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":76,"left":1463,"right":1536},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1537,"text":"+\t\t{","html":"+\t\t{","displayNoNewLineWarning":false,"position":77,"left":1463,"right":1537},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1538,"text":"+\t\t\terrno = 0;","html":"+\t\t\t\u003cspan class=pl-s1\u003eerrno\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":78,"left":1463,"right":1538},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1539,"text":"+\t\t\tloc = newlocale(LC_CTYPE_MASK, ctype, loc1);","html":"+\t\t\t\u003cspan class=pl-s1\u003eloc\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003enewlocale\u003c/span\u003e(\u003cspan class=pl-c1\u003eLC_CTYPE_MASK\u003c/span\u003e, \u003cspan class=pl-s1\u003ectype\u003c/span\u003e, \u003cspan class=pl-s1\u003eloc1\u003c/span\u003e);","displayNoNewLineWarning":false,"position":79,"left":1463,"right":1539},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1540,"text":"+\t\t\tif (!loc)","html":"+\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (!\u003cspan class=pl-s1\u003eloc\u003c/span\u003e)","displayNoNewLineWarning":false,"position":80,"left":1463,"right":1540},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1541,"text":"+\t\t\t\treport_newlocale_failure(ctype);","html":"+\t\t\t\t\u003cspan class=pl-en\u003ereport_newlocale_failure\u003c/span\u003e(\u003cspan class=pl-s1\u003ectype\u003c/span\u003e);","displayNoNewLineWarning":false,"position":81,"left":1463,"right":1541},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1542,"text":"+\t\t}","html":"+\t\t}","displayNoNewLineWarning":false,"position":82,"left":1463,"right":1542},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1543,"text":"+\t\telse","html":"+\t\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e","displayNoNewLineWarning":false,"position":83,"left":1463,"right":1543},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1544,"text":"+\t\t\tloc = loc1;","html":"+\t\t\t\u003cspan class=pl-s1\u003eloc\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eloc1\u003c/span\u003e;","displayNoNewLineWarning":false,"position":84,"left":1463,"right":1544},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1545,"text":"+#else","html":"+\u003cspan class=pl-k\u003e#else\u003c/span\u003e","displayNoNewLineWarning":false,"position":85,"left":1463,"right":1545},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1546,"text":"+","html":"+","displayNoNewLineWarning":false,"position":86,"left":1463,"right":1546},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1547,"text":"+\t\t/*","html":"+\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":87,"left":1463,"right":1547},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1548,"text":"+\t\t * XXX The _create_locale() API doesn't appear to support this. Could","html":"+\u003cspan class=pl-c\u003e\t\t * XXX The _create_locale() API doesn\u0026#39;t appear to support this. Could\u003c/span\u003e","displayNoNewLineWarning":false,"position":88,"left":1463,"right":1548},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1549,"text":"+\t\t * perhaps be worked around by changing pg_locale_t to contain two","html":"+\u003cspan class=pl-c\u003e\t\t * perhaps be worked around by changing pg_locale_t to contain two\u003c/span\u003e","displayNoNewLineWarning":false,"position":89,"left":1463,"right":1549},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1550,"text":"+\t\t * separate fields.","html":"+\u003cspan class=pl-c\u003e\t\t * separate fields.\u003c/span\u003e","displayNoNewLineWarning":false,"position":90,"left":1463,"right":1550},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1551,"text":"+\t\t */","html":"+\u003cspan class=pl-c\u003e\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":91,"left":1463,"right":1551},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1552,"text":"+\t\tereport(ERROR,","html":"+\t\t\u003cspan class=pl-en\u003eereport\u003c/span\u003e(\u003cspan class=pl-c1\u003eERROR\u003c/span\u003e,","displayNoNewLineWarning":false,"position":92,"left":1463,"right":1552},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1553,"text":"+\t\t\t\t(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),","html":"+\t\t\t\t(\u003cspan class=pl-en\u003eerrcode\u003c/span\u003e(\u003cspan class=pl-c1\u003eERRCODE_FEATURE_NOT_SUPPORTED\u003c/span\u003e),","displayNoNewLineWarning":false,"position":93,"left":1463,"right":1553},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1554,"text":"+\t\t\t\t errmsg(\"collations with different collate and ctype values are not supported on this platform\")));","html":"+\t\t\t\t \u003cspan class=pl-en\u003eerrmsg\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026quot;collations with different collate and ctype values are not supported on this platform\u0026quot;\u003c/span\u003e)));","displayNoNewLineWarning":false,"position":94,"left":1463,"right":1554},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1555,"text":"+#endif","html":"+\u003cspan class=pl-k\u003e#endif\u003c/span\u003e","displayNoNewLineWarning":false,"position":95,"left":1463,"right":1555},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1556,"text":"+\t}","html":"+\t}","displayNoNewLineWarning":false,"position":96,"left":1463,"right":1556},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1557,"text":"+","html":"+","displayNoNewLineWarning":false,"position":97,"left":1463,"right":1557},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1558,"text":"+\tresult-\u003einfo.lt = loc;","html":"+\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003einfo\u003c/span\u003e.\u003cspan class=pl-c1\u003elt\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eloc\u003c/span\u003e;","displayNoNewLineWarning":false,"position":98,"left":1463,"right":1558},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1559,"text":"+}","html":"+}","displayNoNewLineWarning":false,"position":99,"left":1463,"right":1559},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1560,"text":"+","html":"+","displayNoNewLineWarning":false,"position":100,"left":1463,"right":1560},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1561,"text":" void","html":" \u003cspan class=pl-smi\u003evoid\u003c/span\u003e","displayNoNewLineWarning":false,"position":101,"left":1464,"right":1561},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1562,"text":" make_icu_collator(const char *iculocstr,","html":" \u003cspan class=pl-en\u003emake_icu_collator\u003c/span\u003e(\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eiculocstr\u003c/span\u003e,","displayNoNewLineWarning":false,"position":102,"left":1465,"right":1562},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1563,"text":" \t\t\t\t const char *icurules,","html":" \t\t\t\t \u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eicurules\u003c/span\u003e,","displayNoNewLineWarning":false,"position":103,"left":1466,"right":1563},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1610,"text":"@@ -1514,36 +1611,6 @@ make_icu_collator(const char *iculocstr,","html":"@@ -1514,36 +1611,6 @@ make_icu_collator(const char *iculocstr,","displayNoNewLineWarning":false,"position":104,"left":1513,"right":1610},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1611,"text":" }","html":" }","displayNoNewLineWarning":false,"position":105,"left":1514,"right":1611},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1612,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":106,"left":1515,"right":1612},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1613,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":107,"left":1516,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1517,"text":"-/* simple subroutine for reporting errors from newlocale() */","html":"-\u003cspan class=pl-c\u003e/* simple subroutine for reporting errors from newlocale() */\u003c/span\u003e","displayNoNewLineWarning":false,"position":108,"left":1517,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1518,"text":"-static void","html":"-\u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e","displayNoNewLineWarning":false,"position":109,"left":1518,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1519,"text":"-report_newlocale_failure(const char *localename)","html":"-\u003cspan class=pl-en\u003ereport_newlocale_failure\u003c/span\u003e(\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003elocalename\u003c/span\u003e)","displayNoNewLineWarning":false,"position":110,"left":1519,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1520,"text":"-{","html":"-{","displayNoNewLineWarning":false,"position":111,"left":1520,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1521,"text":"-\tint\t\t\tsave_errno;","html":"-\t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003esave_errno\u003c/span\u003e;","displayNoNewLineWarning":false,"position":112,"left":1521,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1522,"text":"-","html":"-","displayNoNewLineWarning":false,"position":113,"left":1522,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1523,"text":"-\t/*","html":"-\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":114,"left":1523,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1524,"text":"-\t * Windows doesn't provide any useful error indication from","html":"-\u003cspan class=pl-c\u003e\t * Windows doesn\u0026#39;t provide any useful error indication from\u003c/span\u003e","displayNoNewLineWarning":false,"position":115,"left":1524,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1525,"text":"-\t * _create_locale(), and BSD-derived platforms don't seem to feel they","html":"-\u003cspan class=pl-c\u003e\t * _create_locale(), and BSD-derived platforms don\u0026#39;t seem to feel they\u003c/span\u003e","displayNoNewLineWarning":false,"position":116,"left":1525,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1526,"text":"-\t * need to set errno either (even though POSIX is pretty clear that","html":"-\u003cspan class=pl-c\u003e\t * need to set errno either (even though POSIX is pretty clear that\u003c/span\u003e","displayNoNewLineWarning":false,"position":117,"left":1526,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1527,"text":"-\t * newlocale should do so). So, if errno hasn't been set, assume ENOENT","html":"-\u003cspan class=pl-c\u003e\t * newlocale should do so). So, if errno hasn\u0026#39;t been set, assume ENOENT\u003c/span\u003e","displayNoNewLineWarning":false,"position":118,"left":1527,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1528,"text":"-\t * is what to report.","html":"-\u003cspan class=pl-c\u003e\t * is what to report.\u003c/span\u003e","displayNoNewLineWarning":false,"position":119,"left":1528,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1529,"text":"-\t */","html":"-\u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":120,"left":1529,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1530,"text":"-\tif (errno == 0)","html":"-\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003eerrno\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":121,"left":1530,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1531,"text":"-\t\terrno = ENOENT;","html":"-\t\t\u003cspan class=pl-s1\u003eerrno\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eENOENT\u003c/span\u003e;","displayNoNewLineWarning":false,"position":122,"left":1531,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1532,"text":"-","html":"-","displayNoNewLineWarning":false,"position":123,"left":1532,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1533,"text":"-\t/*","html":"-\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":124,"left":1533,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1534,"text":"-\t * ENOENT means \"no such locale\", not \"no such file\", so clarify that","html":"-\u003cspan class=pl-c\u003e\t * ENOENT means \u0026quot;no such locale\u0026quot;, not \u0026quot;no such file\u0026quot;, so clarify that\u003c/span\u003e","displayNoNewLineWarning":false,"position":125,"left":1534,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1535,"text":"-\t * errno with an errdetail message.","html":"-\u003cspan class=pl-c\u003e\t * errno with an errdetail message.\u003c/span\u003e","displayNoNewLineWarning":false,"position":126,"left":1535,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1536,"text":"-\t */","html":"-\u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":127,"left":1536,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1537,"text":"-\tsave_errno = errno;\t\t\t/* auxiliary funcs might change errno */","html":"-\t\u003cspan class=pl-s1\u003esave_errno\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eerrno\u003c/span\u003e;\t\t\t\u003cspan class=pl-c\u003e/* auxiliary funcs might change errno */\u003c/span\u003e","displayNoNewLineWarning":false,"position":128,"left":1537,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1538,"text":"-\tereport(ERROR,","html":"-\t\u003cspan class=pl-en\u003eereport\u003c/span\u003e(\u003cspan class=pl-c1\u003eERROR\u003c/span\u003e,","displayNoNewLineWarning":false,"position":129,"left":1538,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1539,"text":"-\t\t\t(errcode(ERRCODE_INVALID_PARAMETER_VALUE),","html":"-\t\t\t(\u003cspan class=pl-en\u003eerrcode\u003c/span\u003e(\u003cspan class=pl-c1\u003eERRCODE_INVALID_PARAMETER_VALUE\u003c/span\u003e),","displayNoNewLineWarning":false,"position":130,"left":1539,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1540,"text":"-\t\t\t errmsg(\"could not create locale \\\"%s\\\": %m\",","html":"-\t\t\t \u003cspan class=pl-en\u003eerrmsg\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026quot;could not create locale \\\u0026quot;%s\\\u0026quot;: %m\u0026quot;\u003c/span\u003e,","displayNoNewLineWarning":false,"position":131,"left":1540,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1541,"text":"-\t\t\t\t\tlocalename),","html":"-\t\t\t\t\t\u003cspan class=pl-s1\u003elocalename\u003c/span\u003e),","displayNoNewLineWarning":false,"position":132,"left":1541,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1542,"text":"-\t\t\t (save_errno == ENOENT ?","html":"-\t\t\t (\u003cspan class=pl-s1\u003esave_errno\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003eENOENT\u003c/span\u003e ?","displayNoNewLineWarning":false,"position":133,"left":1542,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1543,"text":"-\t\t\t errdetail(\"The operating system could not find any locale data for the locale name \\\"%s\\\".\",","html":"-\t\t\t \u003cspan class=pl-en\u003eerrdetail\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026quot;The operating system could not find any locale data for the locale name \\\u0026quot;%s\\\u0026quot;.\u0026quot;\u003c/span\u003e,","displayNoNewLineWarning":false,"position":134,"left":1543,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1544,"text":"-\t\t\t\t\t\tlocalename) : 0)));","html":"-\t\t\t\t\t\t\u003cspan class=pl-s1\u003elocalename\u003c/span\u003e) : \u003cspan class=pl-c1\u003e0\u003c/span\u003e)));","displayNoNewLineWarning":false,"position":135,"left":1544,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1545,"text":"-}","html":"-}","displayNoNewLineWarning":false,"position":136,"left":1545,"right":1613},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1546,"text":"-","html":"-","displayNoNewLineWarning":false,"position":137,"left":1546,"right":1613},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1614,"text":" bool","html":" \u003cspan class=pl-smi\u003ebool\u003c/span\u003e","displayNoNewLineWarning":false,"position":138,"left":1547,"right":1614},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1615,"text":" pg_locale_deterministic(pg_locale_t locale)","html":" \u003cspan class=pl-en\u003epg_locale_deterministic\u003c/span\u003e(\u003cspan class=pl-smi\u003epg_locale_t\u003c/span\u003e \u003cspan class=pl-s1\u003elocale\u003c/span\u003e)","displayNoNewLineWarning":false,"position":139,"left":1548,"right":1615},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1616,"text":" {","html":" {","displayNoNewLineWarning":false,"position":140,"left":1549,"right":1616},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1667,"text":"@@ -1601,7 +1668,17 @@ init_database_collation(void)","html":"@@ -1601,7 +1668,17 @@ init_database_collation(void)","displayNoNewLineWarning":false,"position":141,"left":1600,"right":1667},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1668,"text":" \t}","html":" \t}","displayNoNewLineWarning":false,"position":142,"left":1601,"right":1668},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1669,"text":" \telse","html":" \t\u003cspan class=pl-k\u003eelse\u003c/span\u003e","displayNoNewLineWarning":false,"position":143,"left":1602,"right":1669},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1670,"text":" \t{","html":" \t{","displayNoNewLineWarning":false,"position":144,"left":1603,"right":1670},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1671,"text":"+\t\tconst char *datcollate;","html":"+\t\t\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003edatcollate\u003c/span\u003e;","displayNoNewLineWarning":false,"position":145,"left":1603,"right":1671},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1672,"text":"+\t\tconst char *datctype;","html":"+\t\t\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003edatctype\u003c/span\u003e;","displayNoNewLineWarning":false,"position":146,"left":1603,"right":1672},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1673,"text":"+","html":"+","displayNoNewLineWarning":false,"position":147,"left":1603,"right":1673},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1674,"text":" \t\tAssert(dbform-\u003edatlocprovider == COLLPROVIDER_LIBC);","html":" \t\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-s1\u003edbform\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003edatlocprovider\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003eCOLLPROVIDER_LIBC\u003c/span\u003e);","displayNoNewLineWarning":false,"position":148,"left":1604,"right":1674},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1675,"text":"+","html":"+","displayNoNewLineWarning":false,"position":149,"left":1604,"right":1675},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1676,"text":"+\t\tdatum = SysCacheGetAttrNotNull(DATABASEOID, tup, Anum_pg_database_datcollate);","html":"+\t\t\u003cspan class=pl-s1\u003edatum\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eSysCacheGetAttrNotNull\u003c/span\u003e(\u003cspan class=pl-c1\u003eDATABASEOID\u003c/span\u003e, \u003cspan class=pl-s1\u003etup\u003c/span\u003e, \u003cspan class=pl-s1\u003eAnum_pg_database_datcollate\u003c/span\u003e);","displayNoNewLineWarning":false,"position":150,"left":1604,"right":1676},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1677,"text":"+\t\tdatcollate = TextDatumGetCString(datum);","html":"+\t\t\u003cspan class=pl-s1\u003edatcollate\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eTextDatumGetCString\u003c/span\u003e(\u003cspan class=pl-s1\u003edatum\u003c/span\u003e);","displayNoNewLineWarning":false,"position":151,"left":1604,"right":1677},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1678,"text":"+\t\tdatum = SysCacheGetAttrNotNull(DATABASEOID, tup, Anum_pg_database_datctype);","html":"+\t\t\u003cspan class=pl-s1\u003edatum\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eSysCacheGetAttrNotNull\u003c/span\u003e(\u003cspan class=pl-c1\u003eDATABASEOID\u003c/span\u003e, \u003cspan class=pl-s1\u003etup\u003c/span\u003e, \u003cspan class=pl-s1\u003eAnum_pg_database_datctype\u003c/span\u003e);","displayNoNewLineWarning":false,"position":152,"left":1604,"right":1678},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1679,"text":"+\t\tdatctype = TextDatumGetCString(datum);","html":"+\t\t\u003cspan class=pl-s1\u003edatctype\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eTextDatumGetCString\u003c/span\u003e(\u003cspan class=pl-s1\u003edatum\u003c/span\u003e);","displayNoNewLineWarning":false,"position":153,"left":1604,"right":1679},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1680,"text":"+","html":"+","displayNoNewLineWarning":false,"position":154,"left":1604,"right":1680},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1681,"text":"+\t\tmake_libc_collator(datcollate, datctype, \u0026default_locale);","html":"+\t\t\u003cspan class=pl-en\u003emake_libc_collator\u003c/span\u003e(\u003cspan class=pl-s1\u003edatcollate\u003c/span\u003e, \u003cspan class=pl-s1\u003edatctype\u003c/span\u003e, \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003edefault_locale\u003c/span\u003e);","displayNoNewLineWarning":false,"position":155,"left":1604,"right":1681},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1682,"text":" \t}","html":" \t}","displayNoNewLineWarning":false,"position":156,"left":1605,"right":1682},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1683,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":157,"left":1606,"right":1683},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1684,"text":" \tdefault_locale.provider = dbform-\u003edatlocprovider;","html":" \t\u003cspan class=pl-s1\u003edefault_locale\u003c/span\u003e.\u003cspan class=pl-c1\u003eprovider\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003edbform\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003edatlocprovider\u003c/span\u003e;","displayNoNewLineWarning":false,"position":158,"left":1607,"right":1684},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1696,"text":"@@ -1620,8 +1697,6 @@ init_database_collation(void)","html":"@@ -1620,8 +1697,6 @@ init_database_collation(void)","displayNoNewLineWarning":false,"position":159,"left":1619,"right":1696},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1697,"text":" * Create a pg_locale_t from a collation OID. Results are cached for the","html":" \u003cspan class=pl-c\u003e * Create a pg_locale_t from a collation OID. Results are cached for the\u003c/span\u003e","displayNoNewLineWarning":false,"position":160,"left":1620,"right":1697},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1698,"text":" * lifetime of the backend. Thus, do not free the result with freelocale().","html":" \u003cspan class=pl-c\u003e * lifetime of the backend. Thus, do not free the result with freelocale().\u003c/span\u003e","displayNoNewLineWarning":false,"position":161,"left":1621,"right":1698},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1699,"text":" *","html":" \u003cspan class=pl-c\u003e *\u003c/span\u003e","displayNoNewLineWarning":false,"position":162,"left":1622,"right":1699},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1623,"text":"- * As a special optimization, the default/database collation returns 0.","html":"-\u003cspan class=pl-c\u003e * As a special optimization, the default/database collation returns 0.\u003c/span\u003e","displayNoNewLineWarning":false,"position":163,"left":1623,"right":1699},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1624,"text":"- *","html":"-\u003cspan class=pl-c\u003e *\u003c/span\u003e","displayNoNewLineWarning":false,"position":164,"left":1624,"right":1699},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1700,"text":" * For simplicity, we always generate COLLATE + CTYPE even though we","html":" \u003cspan class=pl-c\u003e * For simplicity, we always generate COLLATE + CTYPE even though we\u003c/span\u003e","displayNoNewLineWarning":false,"position":165,"left":1625,"right":1700},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1701,"text":" * might only need one of them. Since this is called only once per session,","html":" \u003cspan class=pl-c\u003e * might only need one of them. Since this is called only once per session,\u003c/span\u003e","displayNoNewLineWarning":false,"position":166,"left":1626,"right":1701},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1702,"text":" * it shouldn't cost much.","html":" \u003cspan class=pl-c\u003e * it shouldn\u0026#39;t cost much.\u003c/span\u003e","displayNoNewLineWarning":false,"position":167,"left":1627,"right":1702},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1709,"text":"@@ -1635,12 +1710,7 @@ pg_newlocale_from_collation(Oid collid)","html":"@@ -1635,12 +1710,7 @@ pg_newlocale_from_collation(Oid collid)","displayNoNewLineWarning":false,"position":168,"left":1634,"right":1709},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1710,"text":" \tAssert(OidIsValid(collid));","html":" \t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-en\u003eOidIsValid\u003c/span\u003e(\u003cspan class=pl-s1\u003ecollid\u003c/span\u003e));","displayNoNewLineWarning":false,"position":169,"left":1635,"right":1710},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1711,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":170,"left":1636,"right":1711},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1712,"text":" \tif (collid == DEFAULT_COLLATION_OID)","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003ecollid\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003eDEFAULT_COLLATION_OID\u003c/span\u003e)","displayNoNewLineWarning":false,"position":171,"left":1637,"right":1712},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1638,"text":"-\t{","html":"-\t{","displayNoNewLineWarning":false,"position":172,"left":1638,"right":1712},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1639,"text":"-\t\tif (default_locale.provider == COLLPROVIDER_LIBC)","html":"-\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003edefault_locale\u003c/span\u003e.\u003cspan class=pl-c1\u003eprovider\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003eCOLLPROVIDER_LIBC\u003c/span\u003e)","displayNoNewLineWarning":false,"position":173,"left":1639,"right":1712},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1640,"text":"-\t\t\treturn (pg_locale_t) 0;","html":"-\t\t\t\u003cspan class=pl-k\u003ereturn\u003c/span\u003e (\u003cspan class=pl-smi\u003epg_locale_t\u003c/span\u003e) \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":174,"left":1640,"right":1712},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1641,"text":"-\t\telse","html":"-\t\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e","displayNoNewLineWarning":false,"position":175,"left":1641,"right":1712},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1642,"text":"-\t\t\treturn \u0026default_locale;","html":"-\t\t\t\u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003edefault_locale\u003c/span\u003e;","displayNoNewLineWarning":false,"position":176,"left":1642,"right":1712},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1643,"text":"-\t}","html":"-\t}","displayNoNewLineWarning":false,"position":177,"left":1643,"right":1712},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1713,"text":"+\t\treturn \u0026default_locale;","html":"+\t\t\u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003edefault_locale\u003c/span\u003e;","displayNoNewLineWarning":false,"position":178,"left":1643,"right":1713},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1714,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":179,"left":1644,"right":1714},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1715,"text":" \tcache_entry = lookup_collation_cache(collid, false);","html":" \t\u003cspan class=pl-s1\u003ecache_entry\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003elookup_collation_cache\u003c/span\u003e(\u003cspan class=pl-s1\u003ecollid\u003c/span\u003e, false);","displayNoNewLineWarning":false,"position":180,"left":1645,"right":1715},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1716,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":181,"left":1646,"right":1716},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1748,"text":"@@ -1679,55 +1749,14 @@ pg_newlocale_from_collation(Oid collid)","html":"@@ -1679,55 +1749,14 @@ pg_newlocale_from_collation(Oid collid)","displayNoNewLineWarning":false,"position":182,"left":1678,"right":1748},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1749,"text":" \t\telse if (collform-\u003ecollprovider == COLLPROVIDER_LIBC)","html":" \t\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003ecollform\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ecollprovider\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003eCOLLPROVIDER_LIBC\u003c/span\u003e)","displayNoNewLineWarning":false,"position":183,"left":1679,"right":1749},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1750,"text":" \t\t{","html":" \t\t{","displayNoNewLineWarning":false,"position":184,"left":1680,"right":1750},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1751,"text":" \t\t\tconst char *collcollate;","html":" \t\t\t\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ecollcollate\u003c/span\u003e;","displayNoNewLineWarning":false,"position":185,"left":1681,"right":1751},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1682,"text":"-\t\t\tconst char *collctype pg_attribute_unused();","html":"-\t\t\t\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ecollctype\u003c/span\u003e \u003cspan class=pl-en\u003epg_attribute_unused\u003c/span\u003e();","displayNoNewLineWarning":false,"position":186,"left":1682,"right":1751},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1683,"text":"-\t\t\tlocale_t\tloc;","html":"-\t\t\t\u003cspan class=pl-smi\u003elocale_t\u003c/span\u003e\t\u003cspan class=pl-s1\u003eloc\u003c/span\u003e;","displayNoNewLineWarning":false,"position":187,"left":1683,"right":1751},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1752,"text":"+\t\t\tconst char *collctype;","html":"+\t\t\t\u003cspan class=pl-k\u003econst\u003c/span\u003e \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ecollctype\u003c/span\u003e;","displayNoNewLineWarning":false,"position":188,"left":1683,"right":1752},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1753,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":189,"left":1684,"right":1753},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1754,"text":" \t\t\tdatum = SysCacheGetAttrNotNull(COLLOID, tp, Anum_pg_collation_collcollate);","html":" \t\t\t\u003cspan class=pl-s1\u003edatum\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eSysCacheGetAttrNotNull\u003c/span\u003e(\u003cspan class=pl-c1\u003eCOLLOID\u003c/span\u003e, \u003cspan class=pl-s1\u003etp\u003c/span\u003e, \u003cspan class=pl-s1\u003eAnum_pg_collation_collcollate\u003c/span\u003e);","displayNoNewLineWarning":false,"position":190,"left":1685,"right":1754},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1755,"text":" \t\t\tcollcollate = TextDatumGetCString(datum);","html":" \t\t\t\u003cspan class=pl-s1\u003ecollcollate\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eTextDatumGetCString\u003c/span\u003e(\u003cspan class=pl-s1\u003edatum\u003c/span\u003e);","displayNoNewLineWarning":false,"position":191,"left":1686,"right":1755},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1756,"text":" \t\t\tdatum = SysCacheGetAttrNotNull(COLLOID, tp, Anum_pg_collation_collctype);","html":" \t\t\t\u003cspan class=pl-s1\u003edatum\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eSysCacheGetAttrNotNull\u003c/span\u003e(\u003cspan class=pl-c1\u003eCOLLOID\u003c/span\u003e, \u003cspan class=pl-s1\u003etp\u003c/span\u003e, \u003cspan class=pl-s1\u003eAnum_pg_collation_collctype\u003c/span\u003e);","displayNoNewLineWarning":false,"position":192,"left":1687,"right":1756},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1757,"text":" \t\t\tcollctype = TextDatumGetCString(datum);","html":" \t\t\t\u003cspan class=pl-s1\u003ecollctype\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eTextDatumGetCString\u003c/span\u003e(\u003cspan class=pl-s1\u003edatum\u003c/span\u003e);","displayNoNewLineWarning":false,"position":193,"left":1688,"right":1757},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1758,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":194,"left":1689,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1690,"text":"-\t\t\tif (strcmp(collcollate, collctype) == 0)","html":"-\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003estrcmp\u003c/span\u003e(\u003cspan class=pl-s1\u003ecollcollate\u003c/span\u003e, \u003cspan class=pl-s1\u003ecollctype\u003c/span\u003e) \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":195,"left":1690,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1691,"text":"-\t\t\t{","html":"-\t\t\t{","displayNoNewLineWarning":false,"position":196,"left":1691,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1692,"text":"-\t\t\t\t/* Normal case where they're the same */","html":"-\t\t\t\t\u003cspan class=pl-c\u003e/* Normal case where they\u0026#39;re the same */\u003c/span\u003e","displayNoNewLineWarning":false,"position":197,"left":1692,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1693,"text":"-\t\t\t\terrno = 0;","html":"-\t\t\t\t\u003cspan class=pl-s1\u003eerrno\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":198,"left":1693,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1694,"text":"-#ifndef WIN32","html":"-\u003cspan class=pl-k\u003e#ifndef\u003c/span\u003e \u003cspan class=pl-c1\u003eWIN32\u003c/span\u003e","displayNoNewLineWarning":false,"position":199,"left":1694,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1695,"text":"-\t\t\t\tloc = newlocale(LC_COLLATE_MASK | LC_CTYPE_MASK, collcollate,","html":"-\t\t\t\t\u003cspan class=pl-s1\u003eloc\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003enewlocale\u003c/span\u003e(\u003cspan class=pl-c1\u003eLC_COLLATE_MASK\u003c/span\u003e | \u003cspan class=pl-c1\u003eLC_CTYPE_MASK\u003c/span\u003e, \u003cspan class=pl-s1\u003ecollcollate\u003c/span\u003e,","displayNoNewLineWarning":false,"position":200,"left":1695,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1696,"text":"-\t\t\t\t\t\t\t\tNULL);","html":"-\t\t\t\t\t\t\t\t\u003cspan class=pl-c1\u003eNULL\u003c/span\u003e);","displayNoNewLineWarning":false,"position":201,"left":1696,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1697,"text":"-#else","html":"-\u003cspan class=pl-k\u003e#else\u003c/span\u003e","displayNoNewLineWarning":false,"position":202,"left":1697,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1698,"text":"-\t\t\t\tloc = _create_locale(LC_ALL, collcollate);","html":"-\t\t\t\t\u003cspan class=pl-s1\u003eloc\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003e_create_locale\u003c/span\u003e(\u003cspan class=pl-c1\u003eLC_ALL\u003c/span\u003e, \u003cspan class=pl-s1\u003ecollcollate\u003c/span\u003e);","displayNoN
10000
ewLineWarning":false,"position":203,"left":1698,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1699,"text":"-#endif","html":"-\u003cspan class=pl-k\u003e#endif\u003c/span\u003e","displayNoNewLineWarning":false,"position":204,"left":1699,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1700,"text":"-\t\t\t\tif (!loc)","html":"-\t\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (!\u003cspan class=pl-s1\u003eloc\u003c/span\u003e)","displayNoNewLineWarning":false,"position":205,"left":1700,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1701,"text":"-\t\t\t\t\treport_newlocale_failure(collcollate);","html":"-\t\t\t\t\t\u003cspan class=pl-en\u003ereport_newlocale_failure\u003c/span\u003e(\u003cspan class=pl-s1\u003ecollcollate\u003c/span\u003e);","displayNoNewLineWarning":false,"position":206,"left":1701,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1702,"text":"-\t\t\t}","html":"-\t\t\t}","displayNoNewLineWarning":false,"position":207,"left":1702,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1703,"text":"-\t\t\telse","html":"-\t\t\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e","displayNoNewLineWarning":false,"position":208,"left":1703,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1704,"text":"-\t\t\t{","html":"-\t\t\t{","displayNoNewLineWarning":false,"position":209,"left":1704,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1705,"text":"-#ifndef WIN32","html":"-\u003cspan class=pl-k\u003e#ifndef\u003c/span\u003e \u003cspan class=pl-c1\u003eWIN32\u003c/span\u003e","displayNoNewLineWarning":false,"position":210,"left":1705,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1706,"text":"-\t\t\t\t/* We need two newlocale() steps */","html":"-\t\t\t\t\u003cspan class=pl-c\u003e/* We need two newlocale() steps */\u003c/span\u003e","displayNoNewLineWarning":false,"position":211,"left":1706,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1707,"text":"-\t\t\t\tlocale_t\tloc1;","html":"-\t\t\t\t\u003cspan class=pl-smi\u003elocale_t\u003c/span\u003e\t\u003cspan class=pl-s1\u003eloc1\u003c/span\u003e;","displayNoNewLineWarning":false,"position":212,"left":1707,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1708,"text":"-","html":"-","displayNoNewLineWarning":false,"position":213,"left":1708,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1709,"text":"-\t\t\t\terrno = 0;","html":"-\t\t\t\t\u003cspan class=pl-s1\u003eerrno\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":214,"left":1709,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1710,"text":"-\t\t\t\tloc1 = newlocale(LC_COLLATE_MASK, collcollate, NULL);","html":"-\t\t\t\t\u003cspan class=pl-s1\u003eloc1\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003enewlocale\u003c/span\u003e(\u003cspan class=pl-c1\u003eLC_COLLATE_MASK\u003c/span\u003e, \u003cspan class=pl-s1\u003ecollcollate\u003c/span\u003e, \u003cspan class=pl-c1\u003eNULL\u003c/span\u003e);","displayNoNewLineWarning":false,"position":215,"left":1710,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1711,"text":"-\t\t\t\tif (!loc1)","html":"-\t\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (!\u003cspan class=pl-s1\u003eloc1\u003c/span\u003e)","displayNoNewLineWarning":false,"position":216,"left":1711,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1712,"text":"-\t\t\t\t\treport_newlocale_failure(collcollate);","html":"-\t\t\t\t\t\u003cspan class=pl-en\u003ereport_newlocale_failure\u003c/span\u003e(\u003cspan class=pl-s1\u003ecollcollate\u003c/span\u003e);","displayNoNewLineWarning":false,"position":217,"left":1712,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1713,"text":"-\t\t\t\terrno = 0;","html":"-\t\t\t\t\u003cspan class=pl-s1\u003eerrno\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":218,"left":1713,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1714,"text":"-\t\t\t\tloc = newlocale(LC_CTYPE_MASK, collctype, loc1);","html":"-\t\t\t\t\u003cspan class=pl-s1\u003eloc\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003enewlocale\u003c/span\u003e(\u003cspan class=pl-c1\u003eLC_CTYPE_MASK\u003c/span\u003e, \u003cspan class=pl-s1\u003ecollctype\u003c/span\u003e, \u003cspan class=pl-s1\u003eloc1\u003c/span\u003e);","displayNoNewLineWarning":false,"position":219,"left":1714,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1715,"text":"-\t\t\t\tif (!loc)","html":"-\t\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (!\u003cspan class=pl-s1\u003eloc\u003c/span\u003e)","displayNoNewLineWarning":false,"position":220,"left":1715,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1716,"text":"-\t\t\t\t\treport_newlocale_failure(collctype);","html":"-\t\t\t\t\t\u003cspan class=pl-en\u003ereport_newlocale_failure\u003c/span\u003e(\u003cspan class=pl-s1\u003ecollctype\u003c/span\u003e);","displayNoNewLineWarning":false,"position":221,"left":1716,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1717,"text":"-#else","html":"-\u003cspan class=pl-k\u003e#else\u003c/span\u003e","displayNoNewLineWarning":false,"position":222,"left":1717,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1718,"text":"-","html":"-","displayNoNewLineWarning":false,"position":223,"left":1718,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1719,"text":"-\t\t\t\t/*","html":"-\t\t\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":224,"left":1719,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1720,"text":"-\t\t\t\t * XXX The _create_locale() API doesn't appear to support","html":"-\u003cspan class=pl-c\u003e\t\t\t\t * XXX The _create_locale() API doesn\u0026#39;t appear to support\u003c/span\u003e","displayNoNewLineWarning":false,"position":225,"left":1720,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1721,"text":"-\t\t\t\t * this. Could perhaps be worked around by changing","html":"-\u003cspan class=pl-c\u003e\t\t\t\t * this. Could perhaps be worked around by changing\u003c/span\u003e","displayNoNewLineWarning":false,"position":226,"left":1721,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1722,"text":"-\t\t\t\t * pg_locale_t to contain two separate fields.","html":"-\u003cspan class=pl-c\u003e\t\t\t\t * pg_locale_t to contain two separate fields.\u003c/span\u003e","displayNoNewLineWarning":false,"position":227,"left":1722,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1723,"text":"-\t\t\t\t */","html":"-\u003cspan class=pl-c\u003e\t\t\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":228,"left":1723,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1724,"text":"-\t\t\t\tereport(ERROR,","html":"-\t\t\t\t\u003cspan class=pl-en\u003eereport\u003c/span\u003e(\u003cspan class=pl-c1\u003eERROR\u003c/span\u003e,","displayNoNewLineWarning":false,"position":229,"left":1724,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1725,"text":"-\t\t\t\t\t\t(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),","html":"-\t\t\t\t\t\t(\u003cspan class=pl-en\u003eerrcode\u003c/span\u003e(\u003cspan class=pl-c1\u003eERRCODE_FEATURE_NOT_SUPPORTED\u003c/span\u003e),","displayNoNewLineWarning":false,"position":230,"left":1725,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1726,"text":"-\t\t\t\t\t\t errmsg(\"collations with different collate and ctype values are not supported on this platform\")));","html":"-\t\t\t\t\t\t \u003cspan class=pl-en\u003eerrmsg\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026quot;collations with different collate and ctype values are not supported on this platform\u0026quot;\u003c/span\u003e)));","displayNoNewLineWarning":false,"position":231,"left":1726,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1727,"text":"-#endif","html":"-\u003cspan class=pl-k\u003e#endif\u003c/span\u003e","displayNoNewLineWarning":false,"position":232,"left":1727,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1728,"text":"-\t\t\t}","html":"-\t\t\t}","displayNoNewLineWarning":false,"position":233,"left":1728,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1729,"text":"-","html":"-","displayNoNewLineWarning":false,"position":234,"left":1729,"right":1758},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1730,"text":"-\t\t\tresult.info.lt = loc;","html":"-\t\t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e.\u003cspan class=pl-c1\u003einfo\u003c/span\u003e.\u003cspan class=pl-c1\u003elt\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eloc\u003c/span\u003e;","displayNoNewLineWarning":false,"position":235,"left":1730,"right":1758},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1759,"text":"+\t\t\tmake_libc_collator(collcollate, collctype, \u0026result);","html":"+\t\t\t\u003cspan class=pl-en\u003emake_libc_collator\u003c/span\u003e(\u003cspan class=pl-s1\u003ecollcollate\u003c/span\u003e, \u003cspan class=pl-s1\u003ecollctype\u003c/span\u003e, \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003eresult\u003c/span\u003e);","displayNoNewLineWarning":false,"position":236,"left":1730,"right":1759},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1760,"text":" \t\t}","html":" \t\t}","displayNoNewLineWarning":false,"position":237,"left":1731,"right":1760},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1761,"text":" \t\telse if (collform-\u003ecollprovider == COLLPROVIDER_ICU)","html":" \t\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003ecollform\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ecollprovider\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003eCOLLPROVIDER_ICU\u003c/span\u003e)","displayNoNewLineWarning":false,"position":238,"left":1732,"right":1761},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1762,"text":" \t\t{","html":" \t\t{","displayNoNewLineWarning":false,"position":239,"left":1733,"right":1762}],"diffNumber":0,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":3301,"linesChanged":191,"newTreeEntry":{"lineCount":3301,"path":"src/backend/utils/adt/pg_locale.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/utils/adt/pg_locale.c","mode":100644},"linesAdded":110,"linesDeleted":81,"path":"src/backend/utils/adt/pg_locale.c","pathDigest":"234705d97b415bf78b3e964c0a3427539c9058636927b3f41a355533c9e7619e","status":"MODIFIED","truncatedReason":null,"oldOid":"6a1d8cef46e654bdc645e9c32412f707471aff2a","newOid":"8240401437c8e261b4ae95fcc4183db98339cc9e","copilotChatReference":null,"deletedSha":"6a1d8cef46e654bdc645e9c32412f707471aff2a","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null}],"splitViewPreference":"unified","ignoreWhitespace":false,"repoOwnerGlobalRelayId":"MDEyOk9yZ2FuaXphdGlvbjE3NzU0Mw==","commentsPreference":"visible","diffLineSpacingPreference":"relaxed","useMonospaceFont":false,"pasteUrlLinkAsPlainText":false,"userNotices":[],"path":"/postgres/postgres/commit/8240401437c8e261b4ae95fcc4183db98339cc9e","fileTreeExpanded":true,"headerInfo":{"additions":110,"deletions":81,"filesChanged":1,"filesChangedString":"1"},"moreDiffsToLoad":false,"asyncDiffLoadInfo":{"startIndex":1,"truncated":false,"byteCount":6956,"lineShownCount":240},"commentInfo":{"canComment":false,"locked":false,"canLock":false,"repoArchived":false},"csrf_tokens":{"/users/diffview?diff=split":{"post":"G_Gj9qqwyFL3x-Y_yMzDdhwNjE5AJX-cb5oAPyDXm-geC9p7U77AjVuITfZiP9yv3oI5o-SH8BAp9uPHil7vew"},"/users/diffview?diff=unified":{"post":"x9mcH_dcv_qk_r9uLvV3hOcUiZa8xvJZpsGRmWvTE_rCI-WSDlK3JQixFKeEBmhdJZs8exhkfdXgrXJhwVpnaQ"},"/notifications/thread":{"post":"fJ7h1rvOlzUWyJoAu2c31RpS9-uIntK-i8Bi9cMIRU8AbrfN-d8vd93CbsnCR9qBny7U2bG7y-UxEB0VKU4pyA"}}},"title":"Do not return NULL from pg_newlocale_from_collation(). · postgres/postgres@8240401","appPayload":{"helpUrl":"https://docs.github.com","findInDiffWorkerPath":"/assets-cdn/worker/find-in-diff-worker-2bfe39677d14.js","enabled_features":{"diff_ux_refresh_beta":false,"diff_inline_comments":true,"diff_ux_refresh_ssr_five":false,"diff_ux_refresh_ssr_ten":false,"react_diff_line_type_character_correction":true}}}
Do not return NULL from pg_newlocale_from_collation().
Previously, pg_newlocale_from_collation() returned NULL as a special
case for the DEFAULT_COLLATION_OID if the provider was libc. In that
case the behavior would depend on the last call to setlocale().
Now, consistent with the other providers, it will return a pointer to
default_locale, which is not dependent on setlocale().
Note: for the C and POSIX locales, the locale_t structure within the
pg_locale_t will still be zero, because those locales are implemented
with internal logic and do not use libc at all.
lc_collate_is_c() and lc_ctype_is_c() still depend on setlocale() to
determine the current locale, which will be removed in a subsequent
commit.
Discussion: https://postgr.es/m/cfd9eb85-c52a-4ec9-a90e-a5e4de56e57d@eisentraut.org
Reviewed-by: Peter Eisentraut, Andreas Karlsson
0 commit comments