> Hi, > > I have a trigger that runs in my Development machine but not in my Production > machine. the code is the following:
> SQL Error: > > ERROR: function replace(text, unknown, integer) does not exist > LINE 1: select replace(replace(replace(replace(replace(replace( $1 ,... > ^
Let me guess: you have 8.2 on your Development machine and 8.3 or 8.4 on your production machine, right?
I think you need to add explicit casts, let me explain:
> HINT: No function matches the given name and argument types. You might need to > add explicit type casts. > QUERY: select replace(replace(replace(replace(replace(replace( $1 , > '@numero_anuncio@', a.id_anuncio_externo), '@nome_anuncio@', a.n_anuncio), > '@idade@', EXTRACT(year from AGE(NOW(), a.dat_nasc))), '@telefone_anuncio@',
EXTRACT(year ...) returns an INT, but replace(...) expects a TEXT or a similar type. Try to add a ::TEXT after the EXTRACT(...) - function: