Re: A typo? - Mailing list pgsql-docs

From jian he
Subject Re: A typo?
Date
Msg-id CACJufxHCjwArsHNEMK=JEzPkoQTaapyWHpAmBjiTOtYaOBNVWg@mail.gmail.com
Whole thread Raw
In response to A typo?  (PG Doc comments form <noreply@postgresql.org>)
Responses Re: A typo?
List pgsql-docs
On Sun, Apr 7, 2024 at 6:30 PM PG Doc comments form
<noreply@postgresql.org> wrote:
>
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/16/plpgsql-declarations.html
> Description:
>
> Under 43.3.1, "Notice that we omitted RETURNS real — we could have included
> it, but it would be redundant."
> Should that be "RETURNS tax" instead of "RETURNS real"?

I think it's related to the plpgsql "RETURNS" and "RETURN" confusion.
RETURN  can appear between "begin", "end".
RETURNS need to specify before "AS".

not omit "RETURNS real" would be:

CREATE FUNCTION sales_tax(subtotal real,  OUT tax real) returns real AS $$
BEGIN
tax := subtotal * 0.06;
END;
$$ LANGUAGE plpgsql;



pgsql-docs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: A typo?
Next
From: Tom Lane
Date:
Subject: Re: A typo?