{"Entry":{"collection":"func","key":"translate","name":"translate","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":true,"doc_overhaul":false,"from":"9.0","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"9.1"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"c19edb8d088dd983c27a16a8864282d432f94713b7266f52699837eaaa39de34","derived_content_hash":"675849959f2695e02b96144374dd41036d48153bb72941a3af9328ae67d6461c","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:0723d1606b74bbf51256c0d9bf5dc7bdcd2313e31b659b04901cc6342ad92a0c","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"7.1","group":"string","group_label":"String Functions And Operators","groups":["string"],"imported_at":"2026-09-27T17:57:28.451811+08:00","last_version":"20","name":"translate","name_key":"translate","position":3053,"present_in":["7.1","7.2","7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"wiki-repair-20261023:6a18e593064d006f339d270a5890c94021dc3ba2a46710bcc70fd60500e4a58f","receipt_sha256":"a08e9b3bc66d4a2268bb91a8ca9da6f43432eaf02544f78217f46b10af6fc7ea","repair":"wiki-repair-20261023"},"signature":"translate ( string text, from text, to text ) → text","signature_count":1,"slug":"translate","source_rev":"wiki-repair-20261023:0723d1606b74bbf51256c0d9bf5dc7bdcd2313e31b659b04901cc6342ad92a0c","summary":"Replaces each character in string that matches a character in the from set with the corresponding character in the to set.","summary_zh":""}},"Definition":{"Collection":"func","Key":"translate","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"translate","SourceRevision":"wiki-repair-20261023:0723d1606b74bbf51256c0d9bf5dc7bdcd2313e31b659b04901cc6342ad92a0c","Facts":{"description":"Replaces each character in string that matches a character in the from set with the corresponding character in the to set. If from is longer than to, occurrences of the extra characters in from are deleted.","description_html":"Replaces each character in \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e that matches a character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e set with the corresponding character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e set. If \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e is longer than \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e, occurrences of the extra characters in \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e are deleted.","description_zh":"将 string 中与 from 集合中匹配的每个字符替换为 to 集合中相应的字符。如果 from 长于 to，输入中出现的 from 中的额外字符会被删除。","description_zh_html":"将 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 中与 \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e 集合中匹配的每个字符替换为 \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e 集合中相应的字符。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e 长于 \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e，输入中出现的 \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e 中的额外字符会被删除。","doc":{"anchor":"FUNCTIONS-STRING-OTHER","file":"functions-string.html","sha256":"dbe9f91e55c35969d99a8d2697b6f7bd5388a24ccc2b89706a666f176025f1e2","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-string.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"dbe9f91e55c35969d99a8d2697b6f7bd5388a24ccc2b89706a666f176025f1e2","version":"18.7"},{"file":"functions-string.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"7eecd3bb343149124be0476a539f3c682476eab2a15489a0e0ad06fbb769ea9e","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"string","group_label":"字符串函数和操作符","lang":"en","layout":"table-new","pages":["functions-string.html"],"prose_only":false,"signatures":[{"description":"Replaces each character in string that matches a character in the from set with the corresponding character in the to set. If from is longer than to, occurrences of the extra characters in from are deleted.","description_html":"Replaces each character in \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e that matches a character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e set with the corresponding character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e set. If \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e is longer than \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e, occurrences of the extra characters in \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e are deleted.","description_zh":"将 string 中与 from 集合中匹配的每个字符替换为 to 集合中相应的字符。如果 from 长于 to，输入中出现的 from 中的额外字符会被删除。","description_zh_html":"将 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 中与 \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e 集合中匹配的每个字符替换为 \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e 集合中相应的字符。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e 长于 \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e，输入中出现的 \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e 中的额外字符会被删除。","examples":[{"expr":"translate('12345', '143', 'ax')","result":"a2x5"}],"html":"\u003ccode class=\"function\"\u003etranslate\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"translate ( string text, from text, to text ) → text","zh_from":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-string.html","sha256":"0446377e0eccc9299099dc4b4b293204c337e3abefcdc396e9698bc54dd1080b"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-STRING-OTHER","file":"functions-string.html","sha256":"dbe9f91e55c35969d99a8d2697b6f7bd5388a24ccc2b89706a666f176025f1e2","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"translate","SourceDatabase":"center","Version":"18","Locale":"en","Title":"translate","Summary":"Replaces each character in string that matches a character in the from set with the corresponding character in the to set. If from is longer than to, occurrences of the extra characters in from are deleted.","BodyHTML":"Replaces each character in \u003cem\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e that matches a character in the \u003cem\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e set with the corresponding character in the \u003cem\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e set. If \u003cem\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e is longer than \u003cem\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e, occurrences of the extra characters in \u003cem\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e are deleted.","SourceRevision":"wiki-repair-20261023:0723d1606b74bbf51256c0d9bf5dc7bdcd2313e31b659b04901cc6342ad92a0c","ContentHash":"cae58b76f7b6c1d5c7cdff4932285a5cccb54e86d977dbaefd17a8ebe6e8e8b6","Payload":{"description":"Replaces each character in string that matches a character in the from set with the corresponding character in the to set. If from is longer than to, occurrences of the extra characters in from are deleted.","description_html":"Replaces each character in \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e that matches a character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e set with the corresponding character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e set. If \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e is longer than \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e, occurrences of the extra characters in \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e are deleted.","signatures":[{"description":"Replaces each character in string that matches a character in the from set with the corresponding character in the to set. If from is longer than to, occurrences of the extra characters in from are deleted.","description_html":"Replaces each character in \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e that matches a character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e set with the corresponding character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e set. If \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e is longer than \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e, occurrences of the extra characters in \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e are deleted.","description_zh":"将 string 中与 from 集合中匹配的每个字符替换为 to 集合中相应的字符。如果 from 长于 to，输入中出现的 from 中的额外字符会被删除。","description_zh_html":"将 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 中与 \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e 集合中匹配的每个字符替换为 \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e 集合中相应的字符。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e 长于 \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e，输入中出现的 \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e 中的额外字符会被删除。","examples":[{"expr":"translate('12345', '143', 'ax')","result":"a2x5"}],"html":"\u003ccode class=\"function\"\u003etranslate\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"translate ( string text, from text, to text ) → text","zh_from":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.1","7.2","7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"95754c3a2c42d0f35c30db627cc9117c1227d4b90e9555e269b38b9218671021","Text":"translate ( string text, from text, to text ) → text","Returns":"text","Payload":{"description":"Replaces each character in string that matches a character in the from set with the corresponding character in the to set. If from is longer than to, occurrences of the extra characters in from are deleted.","description_html":"Replaces each character in \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e that matches a character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e set with the corresponding character in the \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e set. If \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e is longer than \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e, occurrences of the extra characters in \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e are deleted.","description_zh":"将 string 中与 from 集合中匹配的每个字符替换为 to 集合中相应的字符。如果 from 长于 to，输入中出现的 from 中的额外字符会被删除。","description_zh_html":"将 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 中与 \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e 集合中匹配的每个字符替换为 \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e 集合中相应的字符。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e 长于 \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e，输入中出现的 \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e 中的额外字符会被删除。","examples":[{"expr":"translate('12345', '143', 'ax')","result":"a2x5"}],"html":"\u003ccode class=\"function\"\u003etranslate\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003efrom\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eto\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"translate ( string text, from text, to text ) → text","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
