7.18. URL Functions
The extracted components do not contain URI syntax separatorssuch as or ?
.
url_extract_fragment
(url) → varchar-
Returns the fragment identifier from
url
.
url_extract_host
(url) → varchar-
Returns the host from
url
.
url_extract_parameter
(url, name) → varchar
- (url) → varchar
-
Returns the path from
url
.
url_extract_port
(url) → bigint-
Returns the port number from
url
.
url_extract_protocol
(url) → varchar-
Returns the protocol from
url
.
url_extract_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
.
,-
,*
andare 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.
url_decode
(value) → varchar