Re: Extracting hostname from URI column

From: Paul Lambert <paul(dot)lambert(at)autoledgers(dot)com(dot)au>
To: chester c young <chestercyoung(at)yahoo(dot)com>
Cc: ogjunk-pgjedan(at)yahoo(dot)com, sql pgsql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Extracting hostname from URI column
Date: 2007-09-12 01:13:00
Message-ID: 46E73D1C.4020009@autoledgers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

chester c young wrote:
>> I'm trying to use substr() and position() functions to extract the
>> full host name (and later a domain) from a column that holds URLs.
>
> substring( href from '.*://\([^/]*)' );
>

Ok, your solution looks better than mine... but I have no idea how to
interpret that, time to consult some manuals.

--
Paul Lambert
Database Administrator
AutoLedgers

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Andrej Ricnik-Bay 2007-09-12 02:19:12 Re: Extracting hostname from URI column
Previous Message Tom Lane 2007-09-12 01:09:13 Re: select sum within transaction problem