Parse urls with postgres
select
alias,
token
from ts_parse('default', 'https://hashrocket.com/team/brian-dunn')
natural join ts_token_type('default')
alias | token
----------+--------------------------------
protocol | https://
url | hashrocket.com/team/brian-dunn
host | hashrocket.com
url_path | /team/brian-dunn
(4 rows)
Tweet