Re: update with RE

From: Bruno Wolff III <bruno(at)[66(dot)92(dot)219(dot)49]>
To: Vigny Christophe <cvigny(at)artprice(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: update with RE
Date: 2001-12-06 20:05:32
Message-ID: 20011206140532.A22419@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, Dec 03, 2001 at 02:37:22PM +0100,
Vigny Christophe <cvigny(at)artprice(dot)com> wrote:
> hello,
>
> Is it possible to use a Regular expression to update a field like in
> perl (s/T/t/)
> ie :
> update table set name=($1) where name ~* '.*(phe).*'
> substitute using a grouping function $1 is in fact 'phe'.
>
> It should be really interesting and powerfull !

You would have to write a function to do this. There is a note about this
in the 7.2 documentation.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Oleg Lebedev 2001-12-06 20:17:44 view rules
Previous Message Joachim Trinkwitz 2001-12-06 18:33:14 type casting bpchar