"Stephen R. van den Berg" <[email protected]> writes:
> BEGIN
>  vcsid:=vfrom;
>  LOOP
>   vold:=vcsid;
>   SELECT INTO vcsid,vsid parent,sid
>    FROM cmsstruct
>    WHERE csid=vcsid
>    LIMIT 1;
>   EXIT WHEN vsid IS NOT NULL OR vcsid=vold;
>  END LOOP;
>  RETURN vsid;
> END;

And are you certain that's never an infinite loop?  The query string
gives a starting point that one suspects doesn't terminate.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to