Re: Should we still require RETURN in plpgsql?

From: Tom Lane
Subject: Re: Should we still require RETURN in plpgsql?
Date: ,
Msg-id: 10862.1112687019@sss.pgh.pa.us
(view: Whole thread, Raw)
In response to: Re: Should we still require RETURN in plpgsql?  (Dennis Bjorklund)
Responses: Re: Should we still require RETURN in plpgsql?  (Robert Treat)
List: pgsql-hackers

Tree view

Should we still require RETURN in plpgsql?  (Tom Lane, )
 Re: Should we still require RETURN in plpgsql?  (Christopher Kings-Lynne, )
 Re: Should we still require RETURN in plpgsql?  (Dennis Bjorklund, )
  Re: Should we still require RETURN in plpgsql?  (Tom Lane, )
   Re: Should we still require RETURN in plpgsql?  (Robert Treat, )
    Re: Should we still require RETURN in plpgsql?  (Tom Lane, )
     Re: Should we still require RETURN in plpgsql?  (Oleg Bartunov, )
      Re: Should we still require RETURN in plpgsql?  (Tom Lane, )
 Re: Should we still require RETURN in plpgsql?  (Terry Yapt, )

Dennis Bjorklund <> writes:
> On Tue, 5 Apr 2005, Tom Lane wrote:
>> CREATE FUNCTION sum_n_product(x int, y int, OUT sum int, OUT prod int) AS $$
>> BEGIN
>> sum := x + y;
>> prod := x * y;
>> RETURN;
>> END;
>> $$ LANGUAGE plpgsql;

> The above code example do not have any RETURNS clause, does that mean that 
> it defaults to RETURNS void?

No, it effectively "RETURNS record", where the particular record type is
implied by the set of output parameters.  See my previous proposal.
        regards, tom lane



pgsql-hackers by date:

From: "Andrew Dunstan"
Date:
Subject: Re: [GENERAL] plPHP in core?
From: Martín Marqués
Date:
Subject: Re: [GENERAL] plPHP in core?