Search Postgresql Archives

Re: SRF written in C

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



El mié, 02-07-2008 a las 08:02 +0200, Martijn van Oosterhout escribió:
> On Tue, Jul 01, 2008 at 10:02:39AM -0500, Felipe de Jesús Molina Bravo wrote:
> > Hi 
> > 
> > what can i do for  a SRF written in C, can called as follow:
> > 
> >   select * from obtAscendencia('(11099,15685)','(6808,9621)');
> > 
> > I can call the function:
> >   select obtAscendencia('(11099,15685)','(6808,9621)');
> 
> I'm afraid you did not explain what exactly the problem is. Do you mean
> that one or the other of the statements doesn't work? Which one, and
> what is the error message?
> 
> Have a nice day,

ok... sorry

the next statement:
   select * from obtAscendencia('(11099,15685)','(6808,9621)');

never end .... i need to kill the process assigned for my statement...
and  the other statement:

   select obtAscendencia('(11099,15685)','(6808,9621)');

is  correct ... the output is:

 obtascendencia 
----------------
 (4291, 6064)
 (1774, 2507)
 (1031, 1457)
 (288, 407)
 (121, 171)
 (75, 106)
 (29, 41)
 (12, 17)
 (7, 10)
 (2, 3)
(10 filas)

and my question is : 

Why can not perform my function as the first statement?

I suspect that my error is:

        r = obtPadre( &intF->izq, &intF->der );
        if (  ( r->num != 1 ) &&
              ( r->den != 2 )   )
            {
        
                intF->der.num = intF->izq.num;
                intF->der.den = intF->izq.den;
                intF->izq.num = r->num;
                intF->izq.den = r->den;
        
                SRF_RETURN_NEXT(funcctx, (Datum)(r));
            }
        
Where "r" is type "Racional" (Rational)... 



thanks in advance

see you


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux