{"Entry":{"collection":"func","key":"lpad","name":"lpad","aliases":[],"metadata":{"changed_in":["8.1"],"changes":[{"descriptions_changed":true,"doc_overhaul":false,"from":"7.2","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"7.3"},{"descriptions_changed":false,"doc_overhaul":false,"from":"8.0","group_changed":null,"signatures":{"added":["lpad ( string text, length int [, fill text] ) → text"],"removed":["lpad ( string text, length integer [, fill text] ) → text"]},"status":"changed","to":"8.1"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"67215f5563ad2760feaaa3cd999096205f53fc08ee327b59116b335ebd6ba6f3","derived_content_hash":"9ca75968cde1b0df327d42b8b7fbad92669e06c120760de9c368f2849c650144","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:4189a314ee20be7e15d11912c81d2163d2fe4e9fbcabc6c04e450bf82d2bb11c","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.352625+08:00","last_version":"20","name":"lpad","name_key":"lpad","position":3015,"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:f0361878f20785d2302bbba91483679ed3c099e96b064e94c40de3103126d3c5","receipt_sha256":"ce0a945521e9fa201de22ab8fc82488e1dd2269c99d301b3a2bfa109e2a2e3dd","repair":"wiki-repair-20261023"},"signature":"lpad ( string text, length integer [, fill text ] ) → text","signature_count":1,"slug":"lpad","source_rev":"wiki-repair-20261023:4189a314ee20be7e15d11912c81d2163d2fe4e9fbcabc6c04e450bf82d2bb11c","summary":"Extends the string to length length by prepending the characters fill (a space by default).","summary_zh":""}},"Definition":{"Collection":"func","Key":"lpad","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"lpad","SourceRevision":"wiki-repair-20261023:4189a314ee20be7e15d11912c81d2163d2fe4e9fbcabc6c04e450bf82d2bb11c","Facts":{"description":"Extends the string to length length by prepending the characters fill (a space by default). If the string is already longer than length then it is truncated (on the right).","description_html":"Extends the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e to length \u003cem class=\"parameter\"\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e by prepending the characters \u003cem class=\"parameter\"\u003e\u003ccode\u003efill\u003c/code\u003e\u003c/em\u003e (a space by default). If the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e is already longer than \u003cem class=\"parameter\"\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e then it is truncated (on the right).","description_zh":"在 string 前面添加字符 fill（默认为空格），将其填充到长度 length。如果 string 已经长于 length，则从右侧截断。","description_zh_html":"在 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 前面添加字符 \u003cem class=\"parameter\"\u003e\u003ccode\u003efill\u003c/code\u003e\u003c/em\u003e（默认为空格），将其填充到长度 \u003cem class=\"parameter\"\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 已经长于 \u003cem class=\"parameter\"\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e，则从右侧截断。","doc":{"anchor":"FUNCTIONS-STRING-SQL","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":"Extends the string to length length by prepending the characters fill (a space by default). If the string is already longer than length then it is truncated (on the right).","description_html":"Extends the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e to length \u003cem class=\"parameter\"\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e by prepending the characters \u003cem class=\"parameter\"\u003e\u003ccode\u003efill\u003c/code\u003e\u003c/em\u003e (a space by default). If the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e is already longer than \u003cem class=\"parameter\"\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e then it is truncated (on the right).","description_zh":"在 string 前面添加字符 fill（默认为空格），将其填充到长度 length。如果 string 已经长于 length，则从右侧截断。","description_zh_html":"在 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 前面添加字符 \u003cem class=\"parameter\"\u003e\u003ccode\u003efill\u003c/code\u003e\u003c/em\u003e（默认为空格），将其填充到长度 \u003cem class=\"parameter\"\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 已经长于 \u003cem class=\"parameter\"\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e，则从右侧截断。","examples":[{"expr":"lpad('hi', 5, 'xy')","result":"xyxhi"}],"html":"\u003ccode class=\"function\"\u003elpad\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\u003elength\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003efill\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"lpad ( string text, length integer [, fill 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-SQL","file":"functions-string.html","sha256":"dbe9f91e55c35969d99a8d2697b6f7bd5388a24ccc2b89706a666f176025f1e2","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"lpad","SourceDatabase":"center","Version":"18","Locale":"en","Title":"lpad","Summary":"Extends the string to length length by prepending the characters fill (a space by default). If the string is already longer than length then it is truncated (on the right).","BodyHTML":"Extends the \u003cem\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e to length \u003cem\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e by prepending the characters \u003cem\u003e\u003ccode\u003efill\u003c/code\u003e\u003c/em\u003e (a space by default). If the \u003cem\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e is already longer than \u003cem\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e then it is truncated (on the right).","SourceRevision":"wiki-repair-20261023:4189a314ee20be7e15d11912c81d2163d2fe4e9fbcabc6c04e450bf82d2bb11c","ContentHash":"87e76655c300f240e7f4e00ca93f2180518c997991552002f30df6e32d5e4d1d","Payload":{"description":"Extends the string to length length by prepending the characters fill (a space by default). If the string is already longer than length then it is truncated (on the right).","description_html":"Extends the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e to length \u003cem class=\"parameter\"\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e by prepending the characters \u003cem class=\"parameter\"\u003e\u003ccode\u003efill\u003c/code\u003e\u003c/em\u003e (a space by default). If the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e is already longer than \u003cem class=\"parameter\"\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e then it is truncated (on the right).","signatures":[{"description":"Extends the string to length length by prepending the characters fill (a space by default). If the string is already longer than length then it is truncated (on the right).","description_html":"Extends the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e to length \u003cem class=\"parameter\"\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e by prepending the characters \u003cem class=\"parameter\"\u003e\u003ccode\u003efill\u003c/code\u003e\u003c/em\u003e (a space by default). If the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e is already longer than \u003cem class=\"parameter\"\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e then it is truncated (on the right).","description_zh":"在 string 前面添加字符 fill（默认为空格），将其填充到长度 length。如果 string 已经长于 length，则从右侧截断。","description_zh_html":"在 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 前面添加字符 \u003cem class=\"parameter\"\u003e\u003ccode\u003efill\u003c/code\u003e\u003c/em\u003e（默认为空格），将其填充到长度 \u003cem class=\"parameter\"\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 已经长于 \u003cem class=\"parameter\"\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e，则从右侧截断。","examples":[{"expr":"lpad('hi', 5, 'xy')","result":"xyxhi"}],"html":"\u003ccode class=\"function\"\u003elpad\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\u003elength\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003efill\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"lpad ( string text, length integer [, fill 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":"a79ad3ea7b1cc78f8b13969348d6b329611e6a8eecb055ad2fab97801743ba8b","Text":"lpad ( string text, length integer [, fill text] ) → text","Returns":"text","Payload":{"description":"Extends the string to length length by prepending the characters fill (a space by default). If the string is already longer than length then it is truncated (on the right).","description_html":"Extends the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e to length \u003cem class=\"parameter\"\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e by prepending the characters \u003cem class=\"parameter\"\u003e\u003ccode\u003efill\u003c/code\u003e\u003c/em\u003e (a space by default). If the \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e is already longer than \u003cem class=\"parameter\"\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e then it is truncated (on the right).","description_zh":"在 string 前面添加字符 fill（默认为空格），将其填充到长度 length。如果 string 已经长于 length，则从右侧截断。","description_zh_html":"在 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 前面添加字符 \u003cem class=\"parameter\"\u003e\u003ccode\u003efill\u003c/code\u003e\u003c/em\u003e（默认为空格），将其填充到长度 \u003cem class=\"parameter\"\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e。如果 \u003cem class=\"parameter\"\u003e\u003ccode\u003estring\u003c/code\u003e\u003c/em\u003e 已经长于 \u003cem class=\"parameter\"\u003e\u003ccode\u003elength\u003c/code\u003e\u003c/em\u003e，则从右侧截断。","examples":[{"expr":"lpad('hi', 5, 'xy')","result":"xyxhi"}],"html":"\u003ccode class=\"function\"\u003elpad\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\u003elength\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003efill\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"lpad ( string text, length integer [, fill text] ) → text","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
