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.

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 1
  1. PG 12 → 13changed

Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source