Gracias!!!!! No me había fijado en que estaba retornando el tipo de dato equivocado
El 12 de agosto de 2011 14:16, Rodrigo Gonzalez <rjgonz...@estrads.com.ar>escribió: > On 08/12/2011 03:38 PM, Virginia wrote: > >> Hola!!! >> Cambié el AS por INTO y me da el siguiente error >> >> >> ERROR: invalid input syntax for integer: "2.34898380940343" >> CONTEXT: PL/pgSQL function "calculo_distancia" while casting return value >> to function's return type >> >> ********** Error ********** >> >> ERROR: invalid input syntax for integer: "2.34898380940343" >> SQL state: 22P02 >> Context: PL/pgSQL function "calculo_distancia" while casting return value >> to function's return type >> >> >> > La funcion esta deinifida para devolver un entero y 2.34898380940343 no es > un entero, cambia la funcion para devolver float y debiera funcionar > > Saludos > > Rodrigo Gonzalez >