Nit: "Immutable" should be "pure"

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: brian(dot)williams(at)mayalane(dot)com
Subject: Nit: "Immutable" should be "pure"
Date: 2019-11-07 14:17:58
Message-ID: 157313627814.14272.6307248648194149757@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/sql-createindex.html
Description:

The adjective "immutable" describing the functions and operators used in an
index (see two occurrences in doc snippet below) is incorrect and should be
replaced with "pure". Both "pure" and "immutable" are in popular lexicon now
because of the interest in functional programming, so conflating the two can
happen, but the word immutable applies to data and pure applies to
functions. See https://en.wikipedia.org/wiki/Pure_function.

From the CREATE INDEX doc:
All functions and operators used in an index definition must be “immutable”,
that is, their results must depend only on their arguments and never on any
outside influence (such as the contents of another table or the current
time). This restriction ensures that the behavior of the index is
well-defined. To use a user-defined function in an index expression or WHERE
clause, remember to mark the function immutable when you create it.

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2019-11-07 14:32:02 The word "virgin" used incorrectly and probably better off replaced
Previous Message Eugen Konkov 2019-11-07 09:24:29 Re: Does 'instead of delete' trigger support modification of OLD