Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 480A89FB9F4 for ; Mon, 28 May 2007 18:51:38 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 26651-02 for ; Mon, 28 May 2007 18:51:31 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id ED2359FC2A1 for ; Mon, 28 May 2007 18:40:13 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.8/8.13.8) with ESMTP id l4SLe87p081589 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 28 May 2007 15:40:11 -0600 (MDT) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.8/8.13.8) with ESMTP id l4SLe8jR065627; Mon, 28 May 2007 15:40:08 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.8/8.13.8/Submit) id l4SLe8tN065626; Mon, 28 May 2007 15:40:08 -0600 (MDT) (envelope-from mfuhr) Date: Mon, 28 May 2007 15:40:08 -0600 From: Michael Fuhr To: "Alexander B." Cc: "pgsql-admin@postgresql.org" Subject: Re: Return record on recursive call Message-ID: <20070528214007.GA65520@winnie.fuhr.org> References: <465B365F.2010605@yahoo.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <465B365F.2010605@yahoo.com.br> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/294 X-Sequence-Number: 25614 On Mon, May 28, 2007 at 05:06:55PM -0300, Alexander B. wrote: > I am creating a function that when finished the last level, should > return for each row. > I put raise notice to trace and the result is correct, but when I try to > execute, an error is showed. > > "ERRO: wrong record type supplied in RETURN NEXT" > > I created other functions the same way and worked, basically using the > same structure but not recursive. > Is it different return when using recursive. It's hard to say what's wrong with your sample code without seeing it with its surrounding context. Could you post a complete example? Please reduce the problem to the smallest possible example that exhibits the undesirable behavior. This question is a bit off-topic for pgsql-admin; you might get more help on pgsql-general. -- Michael Fuhr