{"Entry":{"collection":"func","key":"least","name":"LEAST","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"8.0","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"8.1"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"},{"descriptions_changed":true,"doc_overhaul":false,"from":"15","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"16"}],"content_hash":"b57f932b2c53a50a65e2237c177524a3f5ba6f35b2b32fcf74b3e3c43782b4b6","derived_content_hash":"f7c9f84831ed09038c81d5bca6f3ed1085557db4acebcd4c68b2d3144fe26d45","first_version":"8.1","group":"conditional","group_label":"Conditional Expressions","groups":["conditional"],"imported_at":"2026-09-27T17:57:28.858243+08:00","last_version":"20","name":"LEAST","name_key":"least","position":18002,"present_in":["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":"b7bd9cda","receipt_sha256":"03274a2f1a8fb643801dde867f7a58370c1449693b90df8f18bbdbd5e1470dfa","repair":"wiki-repair-20261023"},"signature":"LEAST(value [, ...])","signature_count":1,"slug":"least","source_rev":"wiki-repair-20261023:2259dfa2cbe68f413f062def18c4b59ace0bb19ea2e0f4dc9cdd4f95bc82cc92","summary":"The GREATEST and LEAST functions select the largest or smallest value from a list of any number of expressions.","summary_zh":""}},"Definition":{"Collection":"func","Key":"least","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"least","SourceRevision":"wiki-repair-20261023:2259dfa2cbe68f413f062def18c4b59ace0bb19ea2e0f4dc9cdd4f95bc82cc92","Facts":{"description":"The GREATEST and LEAST functions select the largest or smallest value from a list of any number of expressions. The expressions must all be convertible to a common data type, which will be the type of the result (see Section 10.5 for details).","description_html":"The \u003ccode class=\"function\"\u003eGREATEST\u003c/code\u003e and \u003ccode class=\"function\"\u003eLEAST\u003c/code\u003e functions select the largest or smallest value from a list of any number of expressions. The expressions must all be convertible to a common data type, which will be the type of the result (see \u003ca href=\"/docs/18/typeconv-union-case.html\" title=\"10.5. UNION, CASE, and Related Constructs\"\u003eSection 10.5\u003c/a\u003e for details).","description_zh":"GREATEST 和 LEAST 函数从由任意数量的表达式组成的列表中选取最大值或最小值。这些表达式都必须能转换为同一个数据类型，该类型将作为结果类型（详情参见第 10.5 节）。","description_zh_html":"\u003ccode class=\"function\"\u003eGREATEST\u003c/code\u003e 和 \u003ccode class=\"function\"\u003eLEAST\u003c/code\u003e 函数从由任意数量的表达式组成的列表中选取最大值或最小值。这些表达式都必须能转换为同一个数据类型，该类型将作为结果类型（详情参见\u003ca href=\"/zh/docs/18/typeconv-union-case.html\" title=\"10.5. UNION、CASE及相关结构\"\u003e第 10.5 节\u003c/a\u003e）。","doc":{"anchor":"FUNCTIONS-GREATEST-LEAST","file":"functions-conditional.html","slug":"18"},"group":"conditional","group_label":"Conditional Expressions","lang":"en","layout":"table-new","pages":["functions-conditional.html"],"prose_only":false,"signatures":[{"description":"The GREATEST and LEAST functions select the largest or smallest value from a list of any number of expressions. The expressions must all be convertible to a common data type, which will be the type of the result (see Section 10.5 for details).","description_html":"The \u003ccode class=\"function\"\u003eGREATEST\u003c/code\u003e and \u003ccode class=\"function\"\u003eLEAST\u003c/code\u003e functions select the largest or smallest value from a list of any number of expressions. The expressions must all be convertible to a common data type, which will be the type of the result (see \u003ca href=\"/docs/18/typeconv-union-case.html\" title=\"10.5. UNION, CASE, and Related Constructs\"\u003eSection 10.5\u003c/a\u003e for details).","description_zh":"GREATEST 和 LEAST 函数从由任意数量的表达式组成的列表中选取最大值或最小值。这些表达式都必须能转换为同一个数据类型，该类型将作为结果类型（详情参见第 10.5 节）。","description_zh_html":"\u003ccode class=\"function\"\u003eGREATEST\u003c/code\u003e 和 \u003ccode class=\"function\"\u003eLEAST\u003c/code\u003e 函数从由任意数量的表达式组成的列表中选取最大值或最小值。这些表达式都必须能转换为同一个数据类型，该类型将作为结果类型（详情参见\u003ca href=\"/zh/docs/18/typeconv-union-case.html\" title=\"10.5. UNION、CASE及相关结构\"\u003e第 10.5 节\u003c/a\u003e）。","examples":[],"html":"\u003ccode class=\"function\"\u003eLEAST\u003c/code\u003e(\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e [\u003cspan class=\"optional\"\u003e, ...\u003c/span\u003e])","returns":"","text":"LEAST(value [, ...])","zh_from":"same-version-pgdoc"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-conditional.html","sha256":"d64886927461000afd7c15ad2f1983cd4a12f85a8207144d9f72a6668d65132f"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-pgdoc"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-GREATEST-LEAST","file":"functions-conditional.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"least","SourceDatabase":"center","Version":"18","Locale":"en","Title":"LEAST","Summary":"The GREATEST and LEAST functions select the largest or smallest value from a list of any number of expressions. The expressions must all be convertible to a common data type, which will be the type of the result (see Section 10.5 for details).","BodyHTML":"The \u003ccode\u003eGREATEST\u003c/code\u003e and \u003ccode\u003eLEAST\u003c/code\u003e functions select the largest or smallest value from a list of any number of expressions. The expressions must all be convertible to a common data type, which will be the type of the result (see \u003ca href=\"/docs/18/typeconv-union-case.html\" rel=\"nofollow\"\u003eSection 10.5\u003c/a\u003e for details).","SourceRevision":"wiki-repair-20261023:2259dfa2cbe68f413f062def18c4b59ace0bb19ea2e0f4dc9cdd4f95bc82cc92","ContentHash":"b502129057c90b12d09959223a4c2fffb75d45289b9af21d7b92c665ae3a2d8c","Payload":{"description":"The GREATEST and LEAST functions select the largest or smallest value from a list of any number of expressions. The expressions must all be convertible to a common data type, which will be the type of the result (see Section 10.5 for details).","description_html":"The \u003ccode class=\"function\"\u003eGREATEST\u003c/code\u003e and \u003ccode class=\"function\"\u003eLEAST\u003c/code\u003e functions select the largest or smallest value from a list of any number of expressions. The expressions must all be convertible to a common data type, which will be the type of the result (see \u003ca href=\"/docs/18/typeconv-union-case.html\" title=\"10.5. UNION, CASE, and Related Constructs\"\u003eSection 10.5\u003c/a\u003e for details).","signatures":[{"description":"The GREATEST and LEAST functions select the largest or smallest value from a list of any number of expressions. The expressions must all be convertible to a common data type, which will be the type of the result (see Section 10.5 for details).","description_html":"The \u003ccode class=\"function\"\u003eGREATEST\u003c/code\u003e and \u003ccode class=\"function\"\u003eLEAST\u003c/code\u003e functions select the largest or smallest value from a list of any number of expressions. The expressions must all be convertible to a common data type, which will be the type of the result (see \u003ca href=\"/docs/18/typeconv-union-case.html\" title=\"10.5. UNION, CASE, and Related Constructs\"\u003eSection 10.5\u003c/a\u003e for details).","description_zh":"GREATEST 和 LEAST 函数从由任意数量的表达式组成的列表中选取最大值或最小值。这些表达式都必须能转换为同一个数据类型，该类型将作为结果类型（详情参见第 10.5 节）。","description_zh_html":"\u003ccode class=\"function\"\u003eGREATEST\u003c/code\u003e 和 \u003ccode class=\"function\"\u003eLEAST\u003c/code\u003e 函数从由任意数量的表达式组成的列表中选取最大值或最小值。这些表达式都必须能转换为同一个数据类型，该类型将作为结果类型（详情参见\u003ca href=\"/zh/docs/18/typeconv-union-case.html\" title=\"10.5. UNION、CASE及相关结构\"\u003e第 10.5 节\u003c/a\u003e）。","examples":[],"html":"\u003ccode class=\"function\"\u003eLEAST\u003c/code\u003e(\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e [\u003cspan class=\"optional\"\u003e, ...\u003c/span\u003e])","returns":"","text":"LEAST(value [, ...])","zh_from":"same-version-pgdoc"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","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":"f4908b72380bcc514af25d042b3cf9969cb327c8d61423634e026cd71a88e6c0","Text":"LEAST(value [, ...])","Returns":"","Payload":{"description":"The GREATEST and LEAST functions select the largest or smallest value from a list of any number of expressions. The expressions must all be convertible to a common data type, which will be the type of the result (see Section 10.5 for details).","description_html":"The \u003ccode class=\"function\"\u003eGREATEST\u003c/code\u003e and \u003ccode class=\"function\"\u003eLEAST\u003c/code\u003e functions select the largest or smallest value from a list of any number of expressions. The expressions must all be convertible to a common data type, which will be the type of the result (see \u003ca href=\"/docs/18/typeconv-union-case.html\" title=\"10.5. UNION, CASE, and Related Constructs\"\u003eSection 10.5\u003c/a\u003e for details).","description_zh":"GREATEST 和 LEAST 函数从由任意数量的表达式组成的列表中选取最大值或最小值。这些表达式都必须能转换为同一个数据类型，该类型将作为结果类型（详情参见第 10.5 节）。","description_zh_html":"\u003ccode class=\"function\"\u003eGREATEST\u003c/code\u003e 和 \u003ccode class=\"function\"\u003eLEAST\u003c/code\u003e 函数从由任意数量的表达式组成的列表中选取最大值或最小值。这些表达式都必须能转换为同一个数据类型，该类型将作为结果类型（详情参见\u003ca href=\"/zh/docs/18/typeconv-union-case.html\" title=\"10.5. UNION、CASE及相关结构\"\u003e第 10.5 节\u003c/a\u003e）。","examples":[],"html":"\u003ccode class=\"function\"\u003eLEAST\u003c/code\u003e(\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e [\u003cspan class=\"optional\"\u003e, ...\u003c/span\u003e])","returns":"","text":"LEAST(value [, ...])","zh_from":"same-version-pgdoc"}}],"Spellings":null,"SQLState":null,"Evidence":null}
