↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Functions / Network Address Functions And Operators

Creates an abbreviated display format as text.

Reading PG 18current·documented in 27 of 27 versions, 7.1 to 20

Signatures & examples

abbrev ( inet ) → text
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.)
abbrev(inet '10.1.0.0/32') → 10.1.0.0
abbrev ( cidr ) → text
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.)
abbrev(cidr '10.1.0.0/16') → 10.1/16
Version history 3
  1. 12 → 13 changed
  2. 8.1 → 8.2 changed
  3. 7.3 → 7.4 changed

Definition snapshot: b7bd9cda · English manual source