6.18. URL Functions

    The extracted components do not contain URI syntax separatorssuch as or ?.

    • urlextract_fragment(_url) → varchar
    • Returns the fragment identifier from url.

    • urlextract_host(_url) → varchar

    • Returns the host from url.

    • (_url) → varchar

    • Returns the path from url.

    • urlextract_port(_url) → bigint

    • urlextract_protocol(_url) → varchar

    • Returns the protocol from url.

    • urlextract_query(_url) → varchar

    Encoding Functions

    • urlencode(_value) → varchar
    • Escapes by encoding it so that it can be safely included inURL query parameter names and values:

      • Alphanumeric characters are not encoded.
      • The characters ., -, * and _ are not encoded.
      • The ASCII space character is encoded as +.
      • All other characters are converted to UTF-8 and the bytes are encodedas the string %XX where XX is the uppercase hexadecimalvalue of the UTF-8 byte.
    • urldecode(_value) → varchar