{"Entry":{"collection":"func","key":"gcd","name":"gcd","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"13"}],"content_hash":"d31f7778e1372b9f5a21d231b782dae79bf92ccacd6df0594d081e3706e406b1","first_version":"13","group":"math","group_label":"Mathematical Functions And Operators","groups":["math"],"imported_at":"2026-09-14T21:49:48.62499+08:00","last_version":"20","name":"gcd","name_key":"gcd","position":2028,"present_in":["13","14","15","16","17","18","19","20"],"signature":"gcd ( numeric_type, numeric_type ) → numeric_type","signature_count":1,"slug":"gcd","source_rev":"2026-09-14T13:14:25.684213+00:00@99e6866c","summary":"Greatest common divisor (the largest positive number that divides both inputs with no remainder); returns 0 if both inputs are zero; available for integer, bigint, and numeric","summary_zh":""}},"Definition":{"Collection":"func","Key":"gcd","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"gcd","SourceRevision":"2026-09-14T13:14:25.684213+00:00@99e6866c","Facts":{"description":"Greatest common divisor (the largest positive number that divides both inputs with no remainder); returns 0 if both inputs are zero; available for integer, bigint, and numeric","description_html":"Greatest common divisor (the largest positive number that divides both inputs with no remainder); returns \u003ccode class=\"literal\"\u003e0\u003c/code\u003e if both inputs are zero; available for \u003ccode class=\"type\"\u003einteger\u003c/code\u003e, \u003ccode class=\"type\"\u003ebigint\u003c/code\u003e, and \u003ccode class=\"type\"\u003enumeric\u003c/code\u003e","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-MATH-FUNC-TABLE","file":"functions-math.html","slug":"18"},"group":"math","group_label":"Mathematical Functions And Operators","lang":"en","layout":"table-new","pages":["functions-math.html"],"prose_only":false,"signatures":[{"description":"Greatest common divisor (the largest positive number that divides both inputs with no remainder); returns 0 if both inputs are zero; available for integer, bigint, and numeric","description_html":"Greatest common divisor (the largest positive number that divides both inputs with no remainder); returns \u003ccode class=\"literal\"\u003e0\u003c/code\u003e if both inputs are zero; available for \u003ccode class=\"type\"\u003einteger\u003c/code\u003e, \u003ccode class=\"type\"\u003ebigint\u003c/code\u003e, and \u003ccode class=\"type\"\u003enumeric\u003c/code\u003e","description_zh":"","description_zh_html":"","examples":[{"expr":"gcd(1071, 462)","result":"21"}],"html":"\u003ccode class=\"function\"\u003egcd\u003c/code\u003e ( \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumeric_type\u003c/code\u003e\u003c/em\u003e, \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumeric_type\u003c/code\u003e\u003c/em\u003e ) → \u003ccode class=\"returnvalue\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enumeric_type\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e","returns":"numeric_type","text":"gcd ( numeric_type, numeric_type ) → numeric_type","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-MATH-FUNC-TABLE","file":"functions-math.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"gcd","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"gcd","Summary":"最大公约数（能将两个输入数整除而无余数的最大正数）；如果两个输入为零则返回 0；适用于 integer、bigint 和 numeric","BodyHTML":"最大公约数（能将两个输入数整除而无余数的最大正数）；如果两个输入为零则返回 \u003ccode\u003e0\u003c/code\u003e；适用于 \u003ccode\u003einteger\u003c/code\u003e、\u003ccode\u003ebigint\u003c/code\u003e 和 \u003ccode\u003enumeric\u003c/code\u003e\u003cpre\u003egcd ( numeric_type, numeric_type ) → numeric_type\u003c/pre\u003e最大公约数（能将两个输入数整除而无余数的最大正数）；如果两个输入为零则返回 \u003ccode\u003e0\u003c/code\u003e；适用于 \u003ccode\u003einteger\u003c/code\u003e、\u003ccode\u003ebigint\u003c/code\u003e 和 \u003ccode\u003enumeric\u003c/code\u003e","SourceRevision":"ca936764","ContentHash":"e729879fe92884fde361dbec4c7bcc76d5a1f4a7ab967674aafaaa9843707224","Payload":{"description_zh":"最大公约数（能将两个输入数整除而无余数的最大正数）；如果两个输入为零则返回 0；适用于 integer、bigint 和 numeric","description_zh_html":"最大公约数（能将两个输入数整除而无余数的最大正数）；如果两个输入为零则返回 \u003ccode class=\"literal\"\u003e0\u003c/code\u003e；适用于 \u003ccode class=\"type\"\u003einteger\u003c/code\u003e、\u003ccode class=\"type\"\u003ebigint\u003c/code\u003e 和 \u003ccode class=\"type\"\u003enumeric\u003c/code\u003e","signatures":[{"description_zh":"最大公约数（能将两个输入数整除而无余数的最大正数）；如果两个输入为零则返回 0；适用于 integer、bigint 和 numeric","description_zh_html":"最大公约数（能将两个输入数整除而无余数的最大正数）；如果两个输入为零则返回 \u003ccode class=\"literal\"\u003e0\u003c/code\u003e；适用于 \u003ccode class=\"type\"\u003einteger\u003c/code\u003e、\u003ccode class=\"type\"\u003ebigint\u003c/code\u003e 和 \u003ccode class=\"type\"\u003enumeric\u003c/code\u003e","returns":"numeric_type","text":"gcd ( numeric_type, numeric_type ) → numeric_type","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"cada87d41ba7ecd792cc9d938703093100062dcddd3ec6fa77e0902ebc9ce24d","Text":"gcd ( numeric_type, numeric_type ) → numeric_type","Returns":"numeric_type","Payload":{"description":"Greatest common divisor (the largest positive number that divides both inputs with no remainder); returns 0 if both inputs are zero; available for integer, bigint, and numeric","description_html":"Greatest common divisor (the largest positive number that divides both inputs with no remainder); returns \u003ccode class=\"literal\"\u003e0\u003c/code\u003e if both inputs are zero; available for \u003ccode class=\"type\"\u003einteger\u003c/code\u003e, \u003ccode class=\"type\"\u003ebigint\u003c/code\u003e, and \u003ccode class=\"type\"\u003enumeric\u003c/code\u003e","description_zh":"","description_zh_html":"","examples":[{"expr":"gcd(1071, 462)","result":"21"}],"html":"\u003ccode class=\"function\"\u003egcd\u003c/code\u003e ( \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumeric_type\u003c/code\u003e\u003c/em\u003e, \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumeric_type\u003c/code\u003e\u003c/em\u003e ) → \u003ccode class=\"returnvalue\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003enumeric_type\u003c/code\u003e\u003c/em\u003e\u003c/code\u003e","returns":"numeric_type","text":"gcd ( numeric_type, numeric_type ) → numeric_type","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
