Re: regexp_replace in two times?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Luca Ferrari <fluca1978(at)infinito(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: regexp_replace in two times?
Date: 2008-05-08 14:48:22
Message-ID: 1993.1210258102@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Luca Ferrari <fluca1978(at)infinito(dot)it> writes:
> I used the regexp_replace function to make a substitution over a table, but I
> got a strange behaviour (please consider I'm not an expert of regex). The
> idea is to remove the final part of a code, that could be TIF, ISTTIF, tif,
> isttif, and at the same time consider only the records depending on the join
> with another table. Now, the strange thing is that the first query updated
> the most of records, but then 4 records are still there, and in fact
> executing again the same update provides me another substitution. What could
> be the reason?

Maybe the original strings had more than one instance of 'TIF'?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2008-05-08 14:54:32 Re: auto-vacuum questions
Previous Message John Gateley 2008-05-08 14:43:02 auto-vacuum questions