From: | Mario Soto Cordones <msotocl(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
Cc: | pgsql-es-ayuda(at)postgresql(dot)org |
Subject: | Re: Fwd: Problema con ltree |
Date: | 2005-04-22 11:26:02 |
Message-ID: | e9b17cde05042204263ee57a2f@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Es tal cual como lo dices, lo cambie a int8 y funciona, Muchas Gracias
y un abrazo
El 21/04/05, Alvaro Herrera<alvherre(at)dcc(dot)uchile(dot)cl> escribió:
> On Thu, Apr 21, 2005 at 11:39:38AM -0400, Mario Soto Cordones wrote:
>
> Hola,
>
> > CREATE OR REPLACE FUNCTION public.find_refpahi (public.ltree,
> > public.lquery) RETURNS SETOF public.ty_refpahi AS'
> > select set_curcfg(''default'');
> > select activo, path, nlevel(path) - nlevel($1) as level,
> > (select count(*)-1 from test where path <@ p.path) as hijos from test
> > p where path ~ $2 order by path asc
> > 'LANGUAGE 'sql' STABLE CALLED ON NULL INPUT SECURITY INVOKER;
>
> La version nueva es mucho mejor para reportar estos errores. Aca me da
>
> ERROR: el tipo de retorno de función declarada para retornar ty_refpahi no concuerda
> DETALLE: El SELECT final retorna bigint en lugar de integer en la columna 4.
> CONTEXTO: función SQL «find_refpahi»
>
> Si cambio el ultimo argumento del tipo a "int8", funciona.
>
> --
> Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
> "Los dioses no protegen a los insensatos. Éstos reciben protección de
> otros insensatos mejor dotados" (Luis Wu, Mundo Anillo)
>
--
cordialmente,
Ing. Mario Soto Cordones
From | Date | Subject | |
---|---|---|---|
Next Message | Hugo Gamarra | 2005-04-22 11:52:08 | RE: algoritmo complicado para consulta |
Previous Message | David Sáez Palacios | 2005-04-22 07:34:22 | Problemas con pg_dump |