Clarification of "void" type

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "pgsql-docs(at)postgresql(dot)org" <pgsql-docs(at)postgresql(dot)org>
Subject: Clarification of "void" type
Date: 2016-06-15 19:32:37
Message-ID: CAKFQuwZky1t8YxvCidPJJjtE5yb8TR9W5-c0ZchQW21r=9OJZg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The section on pseudo-types names "void" and describes is thusly:

"""
Indicates that a function returns no value.
"""

This can be reasonably interpreted to mean: "Use this when you don't want
the execution of a function to return a value." (i.e., the empty set)

The following paragraph, suitably marked up, would be a nice addition:

If a function declares "RETURNS void" the result of executing the function
will be a single row and column whose type pg_typeof() returns "void".
Void is not null and typically displays textually as the empty string.

I'd maybe modify the table to read:

void : A value that has no content: used to indicate that a function
returns no value.

https://www.postgresql.org/docs/devel/static/datatype-pseudo.html

David J.

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2016-06-17 15:43:11 Pg_upgrade and collation
Previous Message Chelliah, Murugan (EXT - IN/Chennai) 2016-06-15 09:51:00 Re: gamke error -postgres9.4.5