From: | Virginia <mavir78(at)gmail(dot)com> |
---|---|
To: | Rodrigo Gonzalez <rjgonzale(at)estrads(dot)com(dot)ar>, smalltalker(dot)marcelo(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:53:13 |
Message-ID: | CAKCW+TdXK=cSAbb4c0i8ZRfQw13r2yrT4m2Q7WZxRtUhuBN6pA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
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
<rjgonzale(at)estrads(dot)com(dot)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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Guillermo Villanueva | 2011-08-12 21:08:45 | Re: Columna Error en Primary Key |
Previous Message | Rodrigo Gonzalez | 2011-08-12 18:46:54 | Re: [pgsql-es-ayuda] Re: [pgsql-es-ayuda] ayuda con función |