Re: REGEXP_REPLACE woes

From: "Leif B(dot) Kristensen" <leif(at)solumslekt(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: REGEXP_REPLACE woes
Date: 2008-06-11 10:24:14
Message-ID: 200806111224.14301.leif@solumslekt.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday 11. June 2008, Leif B. Kristensen wrote:

> p := BTRIM(tmp, '#')::INTEGER;
> name := get_person_name(p);
> str := REPLACE(str, tmp, name);

I did some "folding" and replaced the above with

str := REPLACE(str, tmp, get_person_name(BTRIM(tmp, '#')::INTEGER));

and got rid of two variables.
--
Leif Biberg Kristensen | Registered Linux User #338009
http://solumslekt.org/ | Cruising with Gentoo/KDE
My Jazz Jukebox: http://www.last.fm/user/leifbk/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mattias.Arbin 2008-06-11 10:30:39 Re: Insert into master table ->" 0 rows affected" -> Hibernate problems
Previous Message Csaba Nagy 2008-06-11 10:00:26 Re: Multithreaded queue in PgSQL