Clarification of "void" type - Mailing list pgsql-docs

From David G. Johnston
Subject Clarification of "void" type
Date
Msg-id CAKFQuwZky1t8YxvCidPJJjtE5yb8TR9W5-c0ZchQW21r=9OJZg@mail.gmail.com
Whole thread Raw
List 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.


David J.

pgsql-docs by date:

Previous
From: Dmitry Igrishin
Date:
Subject: Inaccuracy in fe-protocol3.c
Next
From: "Chelliah, Murugan (EXT - IN/Chennai)"
Date:
Subject: Re: gamke error -postgres9.4.5