<
8000
script type="application/json" data-target="react-app.embeddedData">{"payload":{"commit":{"oid":"d57d61533a2b5b27b60cc9024c54688390871bf6","url":"/postgres/postgres/commit/d57d61533a2b5b27b60cc9024c54688390871bf6","authoredDate":"2019-11-13T15:53:53.000-05:00","committedDate":"2019-11-13T15:53:53.000-05:00","shortMessage":null,"shortMessageMarkdown":"\u003cdiv\u003eAdd missing check_collation_set call to bpcharne().\u003c/div\u003e","shortMessageMarkdownLink":null,"bodyMessageHtml":"We should throw an error for indeterminate collation, but bpcharne()\nwas missing that logic, resulting in a much less user-friendly error\n(either an assertion failure or \"cache lookup failed for collation 0\").\n\nPer report from Manuel Rigger. Back-patch to v12 where the mistake\ncame in, evidently in commit \u003ca class=\"commit-link\" data-hovercard-type=\"commit\" data-hovercard-url=\"https://github.com/postgres/postgres/commit/5e1963fb764e9cc092e0f7b58b28985c311431d9/hovercard\" href=\"https://github.com/postgres/postgres/commit/5e1963fb764e9cc092e0f7b58b28985c311431d9\"\u003e\u003ctt\u003e5e1963f\u003c/tt\u003e\u003c/a\u003e. (Before non-deterministic\ncollations, this function wasn't collation sensitive.)\n\nDiscussion: \u003ca href=\"https://postgr.es/m/CA+u7OA4HOjtymxAbuGNh4-X_2R0Lw5n01tzvP8E5-i-2gQXYWA@mail.gmail.com\" rel=\"nofollow\"\u003ehttps://postgr.es/m/CA+u7OA4HOjtymxAbuGNh4-X_2R0Lw5n01tzvP8E5-i-2gQXYWA@mail.gmail.com\u003c/a\u003e","authors":[{"login":"tglsfdc","displayName":"Tom Lane","avatarUrl":"https://avatars.githubusercontent.com/u/8755309?v=4","path":"/tglsfdc","isGitHub":false}],"committerAttribution":false,"committer":{"login":"tglsfdc","displayName":"Tom Lane","avatarUrl":"https://avatars.githubusercontent.com/u/8755309?v=4","path":"/tglsfdc","isGitHub":false},"parents":["0cafdd03a850265006c0ada1b0bf4f83e087a409"],"globalRelayId":"MDY6Q29tbWl0OTI3NDQyOmQ1N2Q2MTUzM2EyYjViMjdiNjBjYzkwMjRjNTQ2ODgzOTA4NzFiZjY=","sha1":"0cafdd03a850265006c0ada1b0bf4f83e087a409","sha2":"d57d61533a2b5b27b60cc9024c54688390871bf6"},"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":783,"text":"@@ -784,6 +784,8 @@ bpcharne(PG_FUNCTION_ARGS)","html":"@@ -784,6 +784,8 @@ bpcharne(PG_FUNCTION_ARGS)","displayNoNewLineWarning":false,"position":0,"left":783,"right":783},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":784,"text":" \tbool\t\tresult;","html":" \t\u003cspan class=pl-smi\u003ebool\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e;","displayNoNewLineWarning":false,"position":1,"left":784,"right":784},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":785,"text":" \tOid\t\t\tcollid = PG_GET_COLLATION();","html":" \t\u003cspan class=pl-smi\u003eOid\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003ecollid\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003ePG_GET_COLLATION\u003c/span\u003e();","displayNoNewLineWarning":false,"position":2,"left":785,"right":785},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":786,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":3,"left":786,"right":786},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":787,"text":"+\tcheck_collation_set(collid);","html":"+\t\u003cspan class=pl-en\u003echeck_collation_set\u003c/span\u003e(\u003cspan class=pl-s1\u003ecollid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":4,"left":786,"right":787},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":788,"text":"+","html":"+","displayNoNewLineWarning":false,"position":5,"left":786,"right":788},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":789,"text":" \tlen1 = bcTruelen(arg1);","html":" \t\u003cspan class=pl-s1\u003elen1\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003ebcTruelen\u003c/span\u003e(\u003cspan class=pl-s1\u003earg1\u003c/span\u003e);","displayNoNewLineWarning":false,"position":6,"left":787,"right":789},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":790,"text":" \tlen2 = bcTruelen(arg2);","html":" \t\u003cspan class=pl-s1\u003elen2\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003ebcTruelen\u003c/span\u003e(\u003cspan class=pl-s1\u003earg2\u003c/span\u003e);","displayNoNewLineWarning":false,"position":7,"left":788,"right":790},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":791,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":8,"left":789,"right":791}],"diffNumber":0,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":1224,"linesChanged":2,"newTreeEntry":{"lineCount":1224,"path":"src/backend/utils/adt/varchar.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/utils/adt/varchar.c","mode":100644},"linesAdded":2,"linesDeleted":0,"path":"src/backend/utils/adt/varchar.c","pathDigest":"6490bf12dac979f958e8a8af89b2dc4b42974c35aaf1045ec4a0c6ad3f53e8d5","status":"MODIFIED","truncatedReason":null,"oldOid":"0cafdd03a850265006c0ada1b0bf4f83e087a409","newOid":"d57d61533a2b5b27b60cc9024c54688390871bf6","copilotChatReference":null,"deletedSha":"0cafdd03a850265006c0ada1b0bf4f83e087a409","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/d57d61533a2b5b27b60cc9024c54688390871bf6","fileTreeExpanded":true,"headerInfo":{"additions":2,"deletions":0,"filesChanged":1,"filesChangedString":"1"},"moreDiffsToLoad":false,"asyncDiffLoadInfo":{"startIndex":1,"truncated":false,"byteCount":188,"lineShownCount":9},"commentInfo":{"canComment":false,"locked":false,"canLock":false,"repoArchived":false},"csrf_tokens":{"/users/diffview?diff=split":{"post":"-68A6BfKXqIrmk0VKc-g4EKdi1AAaOK7f2VwQG-pk5ORSrPlFOds5pdXsOeypROCNi9PuGSUiekYSzWa_f2ouA"},"/users/diffview?diff=unified":{"post":"GKmxCd-vHKKMgGEVYqwgc5nhNdXgUl60lxp6ipCiOrpyTAIE3IIu5jBNnOf5xpMR7VPxPYSuNebwND9QAvYBkQ"},"/notifications/thread":{"post":"laljHBzxc2c6-7ItX3yCYEme3RDQ0zxG45odilzAFGb6YWMOpz3TWzZfAhyxiBQULRz0R71H2rhasaFhVJWS0g"}}},"title":"Add missing check_collation_set call to bpcharne(). · postgres/postgres@d57d615","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}}}
File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -784,6 +784,8 @@ bpcharne(PG_FUNCTION_ARGS)
784
784
bool result ;
785
785
Oid collid = PG_GET_COLLATION ();
786
786
787
+ check_collation_set (collid );
788
+
787
789
len1 = bcTruelen (arg1 );
788
790
len2 = bcTruelen (arg2 );
789
791
You can’t perform that action at this time.
0 commit comments