Module diesel::pg::expression::functions

source ·
Expand description

PostgreSQL specific functions

Functions

  • Creates an abbreviated display format as text.
  • Computes the broadcast address for the address’s network.
  • Returns the address’s family: 4 for IPv4, 6 for IPv6.
  • Returns the IP address as text, ignoring the netmask.
  • Computes the host mask for the address’s network.
  • Computes the smallest network that includes both of the given networks.
  • Tests whether the addresses belong to the same IP family.
  • Returns the netmask length in bits.
  • Computes the network mask for the address’s network.
  • Returns the network part of the address, zeroing out whatever is to the right of the netmask. (This is equivalent to casting the value to cidr.)
  • Sets the netmask length for an inet or cidr value. For inet, the address part does not changes. For cidr, address bits to the right of the new netmask are set to zero.