Fwd: [SQL] replace text occurrences loaded from table

2012-10-30 Thread jan zimmek
thanks igor, the combination of regexp_replace and string_agg works great for me. the query runs a lot faster than my previous solution and is way easier to grasp. Anfang der weitergeleiteten Nachricht: > Von: Igor Romanchenko > Betreff: Aw: [SQL] replace text occurrences loaded from table >

Re: [SQL] replace text occurrences loaded from table

2012-10-30 Thread David Johnston
> -Original Message- > From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql- > ow...@postgresql.org] On Behalf Of jan zimmek > Sent: Tuesday, October 30, 2012 7:45 AM > To: pgsql-sql@postgresql.org > Subject: [SQL] replace text occurrences loaded from table > > hello, > > i am actually

[SQL] replace text occurrences loaded from table

2012-10-30 Thread jan zimmek
hello, i am actually trying to replace all occurences in a text column with some value, but the occurrences to replace are defined in a table. this is a simplified version of my schema: create temporary table tmp_vars as select var from (values('ABC'),('XYZ'),('VAR123')) entries (var); create