{"Entry":{"collection":"func","key":"mod","name":"mod","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"859591729d99e9c2466505f63670bbd528a344bc62e3684392cc86da38272da3","derived_content_hash":"aac1d7e1ae590923dc991273192bd88ea22687e10f771851c51e846ee8a821d4","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:717f80324efcf1a7b5339dc9daf430a3678abda671c1fa3c0be2f2be2ee64789","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"7.1","group":"math","group_label":"Mathematical Functions And Operators","groups":["math"],"imported_at":"2026-09-27T17:57:28.229901+08:00","last_version":"20","name":"mod","name_key":"mod","position":2035,"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:f76496b7ee0fdc8d2131154a1fe78c634578a7a2e1d7915e3225f95f7a82a6bf","receipt_sha256":"1f049ba2452bb8e379b5a888975467092442eab04210110ebdadc5c4d621c85a","repair":"wiki-repair-20261023"},"signature":"mod ( y numeric_type, x numeric_type ) → numeric_type","signature_count":1,"slug":"mod","source_rev":"wiki-repair-20261023:717f80324efcf1a7b5339dc9daf430a3678abda671c1fa3c0be2f2be2ee64789","summary":"Remainder of y/x; available for smallint, integer, bigint, and numeric","summary_zh":""}},"Definition":{"Collection":"func","Key":"mod","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"mod","SourceRevision":"wiki-repair-20261023:717f80324efcf1a7b5339dc9daf430a3678abda671c1fa3c0be2f2be2ee64789","Facts":{"description":"Remainder of y/x; available for smallint, integer, bigint, and numeric","description_html":"Remainder of \u003cem class=\"parameter\"\u003e\u003ccode\u003ey\u003c/code\u003e\u003c/em\u003e/\u003cem class=\"parameter\"\u003e\u003ccode\u003ex\u003c/code\u003e\u003c/em\u003e; available for \u003ccode class=\"type\"\u003esmallint\u003c/code\u003e, \u003ccode class=\"type\"\u003einteger\u003c/code\u003e, \u003ccode class=\"type\"\u003ebigint\u003c/code\u003e, and \u003ccode class=\"type\"\u003enumeric\u003c/code\u003e","description_zh":"y/x 的余数；适用于 smallint、integer、bigint 和 numeric","description_zh_html":"\u003cem class=\"parameter\"\u003e\u003ccode\u003ey\u003c/code\u003e\u003c/em\u003e/\u003cem class=\"parameter\"\u003e\u003ccode\u003ex\u003c/code\u003e\u003c/em\u003e 的余数；适用于 \u003ccode class=\"type\"\u003esmallint\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":"Remainder of y/x; available for smallint, integer, bigint, and numeric","description_html":"Remainder of \u003cem class=\"parameter\"\u003e\u003ccode\u003ey\u003c/code\u003e\u003c/em\u003e/\u003cem class=\"parameter\"\u003e\u003ccode\u003ex\u003c/code\u003e\u003c/em\u003e; available for \u003ccode class=\"type\"\u003esmallint\u003c/code\u003e, \u003ccode class=\"type\"\u003einteger\u003c/code\u003e, \u003ccode class=\"type\"\u003ebigint\u003c/code\u003e, and \u003ccode class=\"type\"\u003enumeric\u003c/code\u003e","description_zh":"y/x 的余数；适用于 smallint、integer、bigint 和 numeric","description_zh_html":"\u003cem class=\"parameter\"\u003e\u003ccode\u003ey\u003c/code\u003e\u003c/em\u003e/\u003cem class=\"parameter\"\u003e\u003ccode\u003ex\u003c/code\u003e\u003c/em\u003e 的余数；适用于 \u003ccode class=\"type\"\u003esmallint\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":"mod(9, 4)","result":"1"}],"html":"\u003ccode class=\"function\"\u003emod\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003ey\u003c/code\u003e\u003c/em\u003e \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumeric_type\u003c/code\u003e\u003c/em\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003ex\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":"mod ( y numeric_type, x 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":"mod","SourceDatabase":"center","Version":"18","Locale":"en","Title":"mod","Summary":"Remainder of y/x; available for smallint, integer, bigint, and numeric","BodyHTML":"Remainder of \u003cem\u003e\u003ccode\u003ey\u003c/code\u003e\u003c/em\u003e/\u003cem\u003e\u003ccode\u003ex\u003c/code\u003e\u003c/em\u003e; available for \u003ccode\u003esmallint\u003c/code\u003e, \u003ccode\u003einteger\u003c/code\u003e, \u003ccode\u003ebigint\u003c/code\u003e, and \u003ccode\u003enumeric\u003c/code\u003e","SourceRevision":"wiki-repair-20261023:717f80324efcf1a7b5339dc9daf430a3678abda671c1fa3c0be2f2be2ee64789","ContentHash":"7b830f32da489f0b1c54db74aa9da9cfaca4ac0a5107accd30bebf4edaf71f52","Payload":{"description":"Remainder of y/x; available for smallint, integer, bigint, and numeric","description_html":"Remainder of \u003cem class=\"parameter\"\u003e\u003ccode\u003ey\u003c/code\u003e\u003c/em\u003e/\u003cem class=\"parameter\"\u003e\u003ccode\u003ex\u003c/code\u003e\u003c/em\u003e; available for \u003ccode class=\"type\"\u003esmallint\u003c/code\u003e, \u003ccode class=\"type\"\u003einteger\u003c/code\u003e, \u003ccode class=\"type\"\u003ebigint\u003c/code\u003e, and \u003ccode class=\"type\"\u003enumeric\u003c/code\u003e","signatures":[{"description":"Remainder of y/x; available for smallint, integer, bigint, and numeric","description_html":"Remainder of \u003cem class=\"parameter\"\u003e\u003ccode\u003ey\u003c/code\u003e\u003c/em\u003e/\u003cem class=\"parameter\"\u003e\u003ccode\u003ex\u003c/code\u003e\u003c/em\u003e; available for \u003ccode class=\"type\"\u003esmallint\u003c/code\u003e, \u003ccode class=\"type\"\u003einteger\u003c/code\u003e, \u003ccode class=\"type\"\u003ebigint\u003c/code\u003e, and \u003ccode class=\"type\"\u003enumeric\u003c/code\u003e","description_zh":"y/x 的余数；适用于 smallint、integer、bigint 和 numeric","description_zh_html":"\u003cem class=\"parameter\"\u003e\u003ccode\u003ey\u003c/code\u003e\u003c/em\u003e/\u003cem class=\"parameter\"\u003e\u003ccode\u003ex\u003c/code\u003e\u003c/em\u003e 的余数；适用于 \u003ccode class=\"type\"\u003esmallint\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":"mod(9, 4)","result":"1"}],"html":"\u003ccode class=\"function\"\u003emod\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003ey\u003c/code\u003e\u003c/em\u003e \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumeric_type\u003c/code\u003e\u003c/em\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003ex\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":"mod ( y numeric_type, x numeric_type ) → numeric_type","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":"bcec3e2880f12ffe8bb069f202228418e9e622dd66d36fb9a3f031e90d634415","Text":"mod ( y numeric_type, x numeric_type ) → numeric_type","Returns":"numeric_type","Payload":{"description":"Remainder of y/x; available for smallint, integer, bigint, and numeric","description_html":"Remainder of \u003cem class=\"parameter\"\u003e\u003ccode\u003ey\u003c/code\u003e\u003c/em\u003e/\u003cem class=\"parameter\"\u003e\u003ccode\u003ex\u003c/code\u003e\u003c/em\u003e; available for \u003ccode class=\"type\"\u003esmallint\u003c/code\u003e, \u003ccode class=\"type\"\u003einteger\u003c/code\u003e, \u003ccode class=\"type\"\u003ebigint\u003c/code\u003e, and \u003ccode class=\"type\"\u003enumeric\u003c/code\u003e","description_zh":"y/x 的余数；适用于 smallint、integer、bigint 和 numeric","description_zh_html":"\u003cem class=\"parameter\"\u003e\u003ccode\u003ey\u003c/code\u003e\u003c/em\u003e/\u003cem class=\"parameter\"\u003e\u003ccode\u003ex\u003c/code\u003e\u003c/em\u003e 的余数；适用于 \u003ccode class=\"type\"\u003esmallint\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":"mod(9, 4)","result":"1"}],"html":"\u003ccode class=\"function\"\u003emod\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003ey\u003c/code\u003e\u003c/em\u003e \u003cem class=\"replaceable\"\u003e\u003ccode\u003enumeric_type\u003c/code\u003e\u003c/em\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003ex\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":"mod ( y numeric_type, x numeric_type ) → numeric_type","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
