6.18. URL Functions
The extracted components do not contain URI syntax separatorssuch as or ?
.
urlextract_fragment
(_url) → varcharReturns the fragment identifier from
url
.urlextract_host
(_url) → varcharReturns the host from
url
.(_url) → varchar
Returns the path from
url
.urlextract_port
(_url) → biginturlextract_protocol
(_url) → varcharReturns the protocol from
url
.urlextract_query
(_url) → varchar
Encoding Functions
urlencode
(_value) → varcharEscapes 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
whereXX
is the uppercase hexadecimalvalue of the UTF-8 byte.
urldecode
(_value) → varchar