This article is half-done without your Comment! *** Please share your thoughts via Comment ***
In this post, I am sharing a small demonstration on how to parse the URL in PostgreSQL.
Recently, I was working on python project where I needed URL parsing for Amazon S3 file web address.
At the same time, one of the database developers also needed URL parsing in PostgreSQL.
So sharing a small example on this which I studied from the official page of PostgreSQL.
Database Developer can use ts_debug for URL Parsing. In the result, we can get protocol, URL, host, url_path.
Check the below example:
1 2 3 4 5 |
SELECT alias ,description ,token FROM ts_debug('https://www.dbrnd.com/2017/12/postgresql-log-the-drop-table-statement/'); |
Result:
Leave a Reply