Re: return type marked optional but isn't - Mailing list pgsql-docs

From David G. Johnston
Subject Re: return type marked optional but isn't
Date
Msg-id CAKFQuwZ03akGQrj2E3yTaUc3k60QB4_H2fUEYFqX5UhdN7hCrw@mail.gmail.com
Whole thread Raw
In response to return type marked optional but isn't  (PG Doc comments form <noreply@postgresql.org>)
List pgsql-docs
On Wed, Feb 21, 2024 at 10:10 AM PG Doc comments form <noreply@postgresql.org> wrote:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/13/sql-createfunction.html
Description:

the documentation for creating a function shows [ RETURNS rettype | RETURNS
TABLE ( column_name column_type [, ...] ) ] but returns is not optional. At
least when specifying LANGUAGE plpgsql. All the online advice suggests
specifying RETURNS void as the solution.

As with most conditionally option things in the docs reading the description for the item tells you when it can be omitted.

rettype: "When there are OUT or INOUT parameters, the RETURNS clause can be omitted."

David J.

pgsql-docs by date:

Previous
From: PG Doc comments form
Date:
Subject: return type marked optional but isn't
Next
From: Erik Wienhold
Date:
Subject: Re: [PATCH] Fix link to pg_ident_file_mappings