{"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","derived_content_hash":"b8d6cd0570325ad342ee3067383dc251aec5afa973da728466d1578994298ae0","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:670b19433d59c8c95ca3f4528624696c44405a9a2824021d0494df9411360364","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"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"],"repair_provenance":{"original_source_revision":"2026-09-14T13:14:25.684213+00:00@99e6866c","receipt_sha256":"11497ee9ba8d3f234869da87665b06e5cad2f60d9cd76ec6b1369b5c0d896608","repair":"wiki-repair-20261023"},"signature":"gcd ( numeric_type, numeric_type ) → numeric_type","signature_count":1,"slug":"gcd","source_rev":"wiki-repair-20261023:670b19433d59c8c95ca3f4528624696c44405a9a2824021d0494df9411360364","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":"wiki-repair-20261023:670b19433d59c8c95ca3f4528624696c44405a9a2824021d0494df9411360364","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":"最大公约数（能将两个输入数整除而无余数的最大正数）；如果两个输入为零则返回 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","doc":{"anchor":"FUNCTIONS-MATH-FUNC-TABLE","file":"functions-math.html","sha256":"80bdcd3a2c7112aadf400e832cc7c8ee55e389d9b3c12e767c3fbb2b3364ef7b","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-math.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"80bdcd3a2c7112aadf400e832cc7c8ee55e389d9b3c12e767c3fbb2b3364ef7b","version":"18.7"},{"file":"functions-math.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"b48c7e1d8abf0f030ad0ef2aa1403db7015a96af265d49a15eaa2f1945a13a5f","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"math","group_label":"数学函数和操作符","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":"最大公约数（能将两个输入数整除而无余数的最大正数）；如果两个输入为零则返回 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","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":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-math.html","sha256":"b5f393c537ea29401867ea8b97292650ee67b0dd9e8cde535aae77bc594b3736"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-MATH-FUNC-TABLE","file":"functions-math.html","sha256":"80bdcd3a2c7112aadf400e832cc7c8ee55e389d9b3c12e767c3fbb2b3364ef7b","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"gcd","SourceDatabase":"center","Version":"18","Locale":"en","Title":"gcd","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","BodyHTML":"Greatest common divisor (the largest positive number that divides both inputs with no remainder); returns \u003ccode\u003e0\u003c/code\u003e if both inputs are zero; available for \u003ccode\u003einteger\u003c/code\u003e, \u003ccode\u003ebigint\u003c/code\u003e, and \u003ccode\u003enumeric\u003c/code\u003e","SourceRevision":"wiki-repair-20261023:670b19433d59c8c95ca3f4528624696c44405a9a2824021d0494df9411360364","ContentHash":"36353421655c257df2b48fb9614be7e80deaac1dee66af562a1e9e85df3d685d","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","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":"最大公约数（能将两个输入数整除而无余数的最大正数）；如果两个输入为零则返回 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","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":"same-version-manual"}]}},"RequestedLocale":"en","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":"最大公约数（能将两个输入数整除而无余数的最大正数）；如果两个输入为零则返回 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","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":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
