{"Entry":{"collection":"func","key":"abbrev","name":"abbrev","aliases":[],"metadata":{"changed_in":["8.2"],"changes":[{"descriptions_changed":true,"doc_overhaul":false,"from":"7.3","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"7.4"},{"descriptions_changed":false,"doc_overhaul":false,"from":"8.1","group_changed":null,"signatures":{"added":["abbrev ( cidr ) → text"],"removed":[]},"status":"changed","to":"8.2"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"adee543f9833e9951f399457411fa9f11c9f350273ec9f649be2acd5bab32265","first_version":"7.1","group":"net","group_label":"Network Address Functions And Operators","groups":["net"],"imported_at":"2026-09-27T17:57:28.662956+08:00","last_version":"20","name":"abbrev","name_key":"abbrev","position":11000,"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":"abbrev ( inet ) → text","signature_count":2,"slug":"abbrev","source_rev":"b7bd9cda","summary":"Creates an abbreviated display format as text.","summary_zh":""}},"Definition":{"Collection":"func","Key":"abbrev","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"abbrev","SourceRevision":"b7bd9cda","Facts":{"description":"Creates an abbreviated display format as text. (The result is the same as the inet output function produces; it is “abbreviated” only in comparison to the result of an explicit cast to text, which for historical reasons will never suppress the netmask part.)","description_html":"Creates an abbreviated display format as text. (The result is the same as the \u003ccode class=\"type\"\u003einet\u003c/code\u003e output function produces; it is \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003eabbreviated\u003c/span\u003e”\u003c/span\u003e only in comparison to the result of an explicit cast to \u003ccode class=\"type\"\u003etext\u003c/code\u003e, which for historical reasons will never suppress the netmask part.)","description_zh":"","description_zh_html":"","doc":{"anchor":"CIDR-INET-FUNCTIONS-TABLE","file":"functions-net.html","slug":"18"},"group":"net","group_label":"Network Address Functions And Operators","lang":"en","layout":"table-new","pages":["functions-net.html"],"prose_only":false,"signatures":[{"description":"Creates an abbreviated display format as text. (The result is the same as the inet output function produces; it is “abbreviated” only in comparison to the result of an explicit cast to text, which for historical reasons will never suppress the netmask part.)","description_html":"Creates an abbreviated display format as text. (The result is the same as the \u003ccode class=\"type\"\u003einet\u003c/code\u003e output function produces; it is \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003eabbreviated\u003c/span\u003e”\u003c/span\u003e only in comparison to the result of an explicit cast to \u003ccode class=\"type\"\u003etext\u003c/code\u003e, which for historical reasons will never suppress the netmask part.)","description_zh":"","description_zh_html":"","examples":[{"expr":"abbrev(inet '10.1.0.0/32')","result":"10.1.0.0"}],"html":"\u003ccode class=\"function\"\u003eabbrev\u003c/code\u003e ( \u003ccode class=\"type\"\u003einet\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"abbrev ( inet ) → text","zh_from":""},{"description":"Creates an abbreviated display format as text. (The abbreviation consists of dropping all-zero octets to the right of the netmask; more examples are in Table 8.22.)","description_html":"Creates an abbreviated display format as text. (The abbreviation consists of dropping all-zero octets to the right of the netmask; more examples are in \u003ca href=\"/docs/18/datatype-net-types.html#DATATYPE-NET-CIDR-TABLE\" title=\"Table 8.22. cidr Type Input Examples\"\u003eTable 8.22\u003c/a\u003e.)","description_zh":"","description_zh_html":"","examples":[{"expr":"abbrev(cidr '10.1.0.0/16')","result":"10.1/16"}],"html":"\u003ccode class=\"function\"\u003eabbrev\u003c/code\u003e ( \u003ccode class=\"type\"\u003ecidr\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"abbrev ( cidr ) → text","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"CIDR-INET-FUNCTIONS-TABLE","file":"functions-net.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"abbrev","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"abbrev","Summary":"创建文本形式的缩写显示格式。（结果与inet输出函数产生的结果相同；只有与显式类型转换为text的结果相比时，才称为“缩写形式”。由于历史原因，后一种转换从不省略网络掩码部分。）","BodyHTML":"创建文本形式的缩写显示格式。（结果与\u003ccode\u003einet\u003c/code\u003e输出函数产生的结果相同；只有与显式类型转换为\u003ccode\u003etext\u003c/code\u003e的结果相比时，才称为\u003cspan\u003e“\u003cspan\u003e缩写形式\u003c/span\u003e”\u003c/span\u003e。由于历史原因，后一种转换从不省略网络掩码部分。）\u003cpre\u003eabbrev ( inet ) → text\u003c/pre\u003e创建文本形式的缩写显示格式。（结果与\u003ccode\u003einet\u003c/code\u003e输出函数产生的结果相同；只有与显式类型转换为\u003ccode\u003etext\u003c/code\u003e的结果相比时，才称为\u003cspan\u003e“\u003cspan\u003e缩写形式\u003c/span\u003e”\u003c/span\u003e。由于历史原因，后一种转换从不省略网络掩码部分。）\u003cpre\u003eabbrev ( cidr ) → text\u003c/pre\u003e创建文本形式的缩写显示格式。（缩写形式会省略网络掩码右侧值为零的字节；更多示例见\u003ca href=\"/docs/18/datatype-net-types.html#DATATYPE-NET-CIDR-TABLE\" rel=\"nofollow\"\u003e表 8.22\u003c/a\u003e。）","SourceRevision":"ca936764","ContentHash":"fe3f00bd829d1b1f0d2c635ddc951b38804daf2e7350978d3584813c2ecace7f","Payload":{"description_zh":"创建文本形式的缩写显示格式。（结果与inet输出函数产生的结果相同；只有与显式类型转换为text的结果相比时，才称为“缩写形式”。由于历史原因，后一种转换从不省略网络掩码部分。）","description_zh_html":"创建文本形式的缩写显示格式。（结果与\u003ccode class=\"type\"\u003einet\u003c/code\u003e输出函数产生的结果相同；只有与显式类型转换为\u003ccode class=\"type\"\u003etext\u003c/code\u003e的结果相比时，才称为\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003e缩写形式\u003c/span\u003e”\u003c/span\u003e。由于历史原因，后一种转换从不省略网络掩码部分。）","signatures":[{"description_zh":"创建文本形式的缩写显示格式。（结果与inet输出函数产生的结果相同；只有与显式类型转换为text的结果相比时，才称为“缩写形式”。由于历史原因，后一种转换从不省略网络掩码部分。）","description_zh_html":"创建文本形式的缩写显示格式。（结果与\u003ccode class=\"type\"\u003einet\u003c/code\u003e输出函数产生的结果相同；只有与显式类型转换为\u003ccode class=\"type\"\u003etext\u003c/code\u003e的结果相比时，才称为\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003e缩写形式\u003c/span\u003e”\u003c/span\u003e。由于历史原因，后一种转换从不省略网络掩码部分。）","returns":"text","text":"abbrev ( inet ) → text","zh_from":"doc"},{"description_zh":"创建文本形式的缩写显示格式。（缩写形式会省略网络掩码右侧值为零的字节；更多示例见表 8.22。）","description_zh_html":"创建文本形式的缩写显示格式。（缩写形式会省略网络掩码右侧值为零的字节；更多示例见\u003ca href=\"/docs/18/datatype-net-types.html#DATATYPE-NET-CIDR-TABLE\" title=\"表 8.22. cidr类型输入示例\"\u003e表 8.22\u003c/a\u003e。）","returns":"text","text":"abbrev ( cidr ) → text","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":"f615f71555b1bfc497ff6691b2b95e7d299162ba0da012b0ce5d768ab27d58a2","Text":"abbrev ( inet ) → text","Returns":"text","Payload":{"description":"Creates an abbreviated display format as text. (The result is the same as the inet output function produces; it is “abbreviated” only in comparison to the result of an explicit cast to text, which for historical reasons will never suppress the netmask part.)","description_html":"Creates an abbreviated display format as text. (The result is the same as the \u003ccode class=\"type\"\u003einet\u003c/code\u003e output function produces; it is \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003eabbreviated\u003c/span\u003e”\u003c/span\u003e only in comparison to the result of an explicit cast to \u003ccode class=\"type\"\u003etext\u003c/code\u003e, which for historical reasons will never suppress the netmask part.)","description_zh":"","description_zh_html":"","examples":[{"expr":"abbrev(inet '10.1.0.0/32')","result":"10.1.0.0"}],"html":"\u003ccode class=\"function\"\u003eabbrev\u003c/code\u003e ( \u003ccode class=\"type\"\u003einet\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"abbrev ( inet ) → text","zh_from":""}},{"Version":"18","Ordinal":1,"Hash":"25987d3ae740cefd5e3747e5fb0ebc6f8e11c3509756c195c7777f8c3df05f4b","Text":"abbrev ( cidr ) → text","Returns":"text","Payload":{"description":"Creates an abbreviated display format as text. (The abbreviation consists of dropping all-zero octets to the right of the netmask; more examples are in Table 8.22.)","description_html":"Creates an abbreviated display format as text. (The abbreviation consists of dropping all-zero octets to the right of the netmask; more examples are in \u003ca href=\"/docs/18/datatype-net-types.html#DATATYPE-NET-CIDR-TABLE\" title=\"Table 8.22. cidr Type Input Examples\"\u003eTable 8.22\u003c/a\u003e.)","description_zh":"","description_zh_html":"","examples":[{"expr":"abbrev(cidr '10.1.0.0/16')","result":"10.1/16"}],"html":"\u003ccode class=\"function\"\u003eabbrev\u003c/code\u003e ( \u003ccode class=\"type\"\u003ecidr\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"abbrev ( cidr ) → text","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
