Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id AB7689FA491; Mon, 16 Oct 2006 00:27:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 47566-06; Mon, 16 Oct 2006 00:27:45 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id DE77E9FB515; Mon, 16 Oct 2006 00:27:35 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k9G3RZfC007544; Sun, 15 Oct 2006 23:27:35 -0400 (EDT) To: "Marc G. Fournier" cc: pgsql-sql@postgresql.org Subject: Re: Recursive pl/pgsql function ... In-reply-to: References: Comments: In-reply-to "Marc G. Fournier" message dated "Sun, 15 Oct 2006 23:39:51 -0300" Date: Sun, 15 Oct 2006 23:27:34 -0400 Message-ID: <7543.1160969254@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.089 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200610/149 X-Sequence-Number: 26538 "Marc G. Fournier" writes: > More then one Record: > # select get_next_billing_date(activated, 12) from company_details; > ERROR: control reached end of function without RETURN > CONTEXT: PL/pgSQL function "get_next_billing_date" Hm, what PG version is this? I couldn't duplicate that in HEAD, though I did find out that a zero or negative payment_period makes it recurse until "stack depth exceeded". regards, tom lane