Re: [pgsql-es-ayuda] Re: [pgsql-es-ayuda] ayuda con función

From: Rodrigo Gonzalez <rjgonzale(at)estrads(dot)com(dot)ar>
To: Virginia <mavir78(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Ayuda <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: [pgsql-es-ayuda] Re: [pgsql-es-ayuda] ayuda con función
Date: 2011-08-12 18:46:54
Message-ID: 4E45751E.3010606@estrads.com.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

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

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Virginia 2011-08-12 18:53:13 Re: [pgsql-es-ayuda] Re: [pgsql-es-ayuda] ayuda con función
Previous Message Juan 2011-08-12 18:42:55 Re: [pgsql-es-ayuda] Re: [pgsql-es-ayuda] ayuda con función