pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
return type marked optional but isn't
2+ messages / 2 participants
[nested] [flat]

* return type marked optional but isn't
@ 2024-02-21 16:54  PG Doc comments form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Doc comments form @ 2024-02-21 16:54 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: scott.comer@voya.com

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.


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: return type marked optional but isn't
@ 2024-02-21 17:33  David G. Johnston <david.g.johnston@gmail.com>
  parent: PG Doc comments form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: David G. Johnston @ 2024-02-21 17:33 UTC (permalink / raw)
  To: scott.comer@voya.com; pgsql-docs@lists.postgresql.org

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.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-02-21 17:33 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-02-21 16:54 return type marked optional but isn't PG Doc comments form <noreply@postgresql.org>
2024-02-21 17:33 ` David G. Johnston <david.g.johnston@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox