Extract Host
This function extracts the host from a URL.
D SELECT extract_host('https://b.a.example.com/path/path') AS host;
βββββββββββββββββββ
β host β
β varchar β
βββββββββββββββββββ€
β b.a.example.com β
βββββββββββββββββββ
D SELECT extract_host('example.com:443/path/image.png') AS host;
βββββββββββββββ
β host β
β varchar β
βββββββββββββββ€
β example.com β
βββββββββββββββLast updated
Was this helpful?