From: Paul Lambert <paul.lambert@autoledgers.com.au>
To: chester c young <chestercyoung@yahoo.com>
Cc: ogjunk-pgjedan@yahoo.com, sql pgsql <pgsql-sql@postgresql.org>
Subject: Re: Extracting hostname from URI column
Date: Wed, 12 Sep 2007 09:13:00 +0800
Message-ID: <46E73D1C.4020009@autoledgers.com.au> (raw)
In-Reply-To: <335491.75226.qm@web54303.mail.re2.yahoo.com>
References: <335491.75226.qm@web54303.mail.re2.yahoo.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: paul.lambert@autoledgers.com.au, chestercyoung@yahoo.com
Subject: Re: Extracting hostname from URI column
In-Reply-To: <46E73D1C.4020009@autoledgers.com.au>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox