Alexander Farber <alexander(dot)farber(at)gmail(dot)com> writes:
> update pg_proc set prosrc = regexp_replace(prosrc, '$\(\w+\)','Hi
> english','g') where proname='localize_hello';
"$" is a metacharacter in regexes ... writing \$ might help.
(The idea of direct updates on the system catalogs seems like a really
bad one. Why not pass the code through sed or the like ahead of
feeding it to psql? But you'd have to get the regex syntax right
in any case.)
regards, tom lane