Leif Biberg Kristensen <l...@solumslekt.org> wrote: > On Saturday 17. September 2011 19.07.03 Tim Landscheidt wrote: >> Leif Biberg Kristensen <l...@solumslekt.org> wrote:
>> > UPDATE sources SET source_text = regexp_replace(source_text, >> > E'n="(.*?)$1(.*?)"', E'n="\\1$2\\2"', 'g') where source_text like >> > '%n="%$1%">%' >> Try: >> > UPDATE sources SET source_text = regexp_replace(source_text, >> > CONCAT(E'n="(.*?)', $1, E'(.*?)"'), CONCAT(E'n="\\1', $2, '\\2"', 'g') >> > where source_text like CONCAT('%n="%', $1, '%">%') > The function CONCAT doesn't exist i PostgreSQL. Eh, yes, of course. > And I can't get it to work > with EXECUTE and standard concatenation either: > [...] What do you need the EXECUTE for? Just drop it. Tim -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql