{"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","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"],"signature":"LEAST(value [, ...])","signature_count":1,"slug":"least","source_rev":"b7bd9cda","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":"b7bd9cda","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":"","description_zh_html":"","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":"","description_zh_html":"","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":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-GREATEST-LEAST","file":"functions-conditional.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"least","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"LEAST","Summary":"GREATEST和LEAST函数从由任意数量的表达式组成的列表中选取最大值或最小值。这些表达式都必须能转换为同一个数据类型，该类型将作为结果类型（详情参见第 10.5 节）。","BodyHTML":"\u003ccode\u003eGREATEST\u003c/code\u003e和\u003ccode\u003eLEAST\u003c/code\u003e函数从由任意数量的表达式组成的列表中选取最大值或最小值。这些表达式都必须能转换为同一个数据类型，该类型将作为结果类型（详情参见\u003ca href=\"/docs/18/typeconv-union-case.html\" rel=\"nofollow\"\u003e第 10.5 节\u003c/a\u003e）。\u003cpre\u003eLEAST(value [, ...])\u003c/pre\u003e\u003ccode\u003eGREATEST\u003c/code\u003e和\u003ccode\u003eLEAST\u003c/code\u003e函数从由任意数量的表达式组成的列表中选取最大值或最小值。这些表达式都必须能转换为同一个数据类型，该类型将作为结果类型（详情参见\u003ca href=\"/docs/18/typeconv-union-case.html\" rel=\"nofollow\"\u003e第 10.5 节\u003c/a\u003e）。","SourceRevision":"ca936764","ContentHash":"fbdaf744ae9a08186700aa4d72ee716ac59208bac3eb14cf4ca0544d5a83966c","Payload":{"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=\"/docs/18/typeconv-union-case.html\" title=\"10.5. UNION、CASE及相关结构\"\u003e第 10.5 节\u003c/a\u003e）。","signatures":[{"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=\"/docs/18/typeconv-union-case.html\" title=\"10.5. UNION、CASE及相关结构\"\u003e第 10.5 节\u003c/a\u003e）。","returns":"","text":"LEAST(value [, ...])","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","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":"","description_zh_html":"","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":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
