From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | joseph speigle <joe(at)hovey(dot)hoveymotorcars(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: substring syntax with regexp |
Date: | 2004-06-30 15:13:25 |
Message-ID: | 20040630151324.GB15718@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Jun 30, 2004 at 08:45:18AM -0500, joseph speigle wrote:
> hi,
>
> Does anybody know offhand what is the correct way to use substr to
> extract the domain name from a client_referer column as logged by
> mod_pgsqllog (httpd module), by correcting the following:
Nah, your problem is before the syntax of the substr function. You have
to quote your single quotes in the function text. So the relevant like
would look like
> newuri = substr(tempuri from ''http://[^/]*/.*'');
I didn't look at the rest of the function ...
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Uno combate cuando es necesario... ¡no cuando está de humor!
El humor es para el ganado, o para hacer el amor, o para tocar el
baliset. No para combatir." (Gurney Halleck)
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas LeBlanc | 2004-06-30 15:14:54 | Running PostgreSQL on Windows 9x/2000/2003... |
Previous Message | Tom Lane | 2004-06-30 14:52:06 | Re: Slow dump with pg_dump/pg_restore ? How to improve ? |