{"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","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"],"signature":"mod ( y numeric_type, x numeric_type ) → numeric_type","signature_count":1,"slug":"mod","source_rev":"b7bd9cda","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":"b7bd9cda","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":"","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":"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":"","description_zh_html":"","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":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-MATH-FUNC-TABLE","file":"functions-math.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"mod","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"mod","Summary":"y/x的余数；适用于smallint、integer、bigint 和 numeric","BodyHTML":"\u003cem\u003e\u003ccode\u003ey\u003c/code\u003e\u003c/em\u003e/\u003cem\u003e\u003ccode\u003ex\u003c/code\u003e\u003c/em\u003e的余数；适用于\u003ccode\u003esmallint\u003c/code\u003e、\u003ccode\u003einteger\u003c/code\u003e、\u003ccode\u003ebigint\u003c/code\u003e 和 \u003ccode\u003enumeric\u003c/code\u003e\u003cpre\u003emod ( y numeric_type, x numeric_type ) → numeric_type\u003c/pre\u003e\u003cem\u003e\u003ccode\u003ey\u003c/code\u003e\u003c/em\u003e/\u003cem\u003e\u003ccode\u003ex\u003c/code\u003e\u003c/em\u003e的余数；适用于\u003ccode\u003esmallint\u003c/code\u003e、\u003ccode\u003einteger\u003c/code\u003e、\u003ccode\u003ebigint\u003c/code\u003e 和 \u003ccode\u003enumeric\u003c/code\u003e","SourceRevision":"ca936764","ContentHash":"cc4b64ec5e3e4528f11b7fc370fd4a03ab9b7846049e44110aff92251078ac88","Payload":{"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","signatures":[{"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","returns":"numeric_type","text":"mod ( y numeric_type, x numeric_type ) → numeric_type","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","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":"","description_zh_html":"","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":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
