Sunday, 21 January 2024

How to parse the URL in PostgreSQL

 
How to parse the URL in PostgreSQL

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:

Result:




No comments:

Post a Comment

Master and Slave - Sync check - PostgreSQL

  1) Run the below Query on Primary:- SELECT     pid,     usename,     application_name,     client_addr,     state,     sync_state,     sen...