"Marc G. Fournier" <scrappy(at)postgresql(dot)org> 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