pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_advisory_unlock(null)
2+ messages / 2 participants
[nested] [flat]

* pg_advisory_unlock(null)
@ 2022-07-14 12:47 PG Doc comments form <noreply@postgresql.org>
  2022-07-15 19:52 ` Re: pg_advisory_unlock(null) David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Doc comments form @ 2022-07-14 12:47 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: morgothko@gmail.com

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/functions-admin.html
Description:

Hello!
There is no information in documentation about pg_advisory_unlock with NULL
value.
This call: select pg_advisory_unlock(null), returns null without reporting,
but according to the documentation it was expected either false or true.
Maybe add information about null value?
version: 12.10


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

* Re: pg_advisory_unlock(null)
  2022-07-14 12:47 pg_advisory_unlock(null) PG Doc comments form <noreply@postgresql.org>
@ 2022-07-15 19:52 ` David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: David G. Johnston @ 2022-07-15 19:52 UTC (permalink / raw)
  To: morgothko@gmail.com, Pg Docs <pgsql-docs@lists.postgresql.org>

On Thu, Jul 14, 2022 at 6:36 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/12/functions-admin.html
> Description:
>
> Hello!
> There is no information in documentation about pg_advisory_unlock with NULL
> value.
> This call: select pg_advisory_unlock(null), returns null without reporting,
> but according to the documentation it was expected either false or true.
> Maybe add information about null value?
> version: 12.10
>

It is defined as strict because there is nothing meaningful that could be
done with a null input.  Saying that seems unnecessary; I'm sure if you
look you will find many more places where this complaint applies.

If I did anything it would be to add a comment to the Function and
Operators page that says something like:

Many of the functions listed herein cannot produce a meaningful result when
supplied with null arguments.  These functions will simply produce a null
output without being invoked. These are not explicitly labelled in the
documentation, though you may inspect the system catalog to confirm whether
a given function is or is not defined as being "strict" (returns null on
null input).  In most cases one should assume that unless the behavior
regarding null inputs is explained that the function in question is defined
to be strict.  Operators likewise tend to produce null outputs if at least
one of their inputs are null.  Aggregate and window functions are the most
common exception to this rule.

David J.

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


end of thread, other threads:[~2022-07-15 19:52 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-07-14 12:47 pg_advisory_unlock(null) PG Doc comments form <noreply@postgresql.org>
2022-07-15 19:52 ` 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