doc: clarify when expression indexes evaluate their expressions
authorBruce Momjian
Wed, 22 Dec 2021 21:29:16 +0000 (16:29 -0500)
committerBruce Momjian
Wed, 22 Dec 2021 21:29:16 +0000 (16:29 -0500)
Only non-HOT updates evaluate the index expression.

Reported-by: Chris Lowder
Discussion: https://postgr.es/m/163967385701.26064.15365003480975321072@wrigleys.postgresql.org

Backpatch-through: 10

doc/src/sgml/indices.sgml

index 671299ff059d972ff95bdb1d67ed4c89bf5040b2..0eeed4676a907945cc4b770692c66171080bde89 100644 (file)
@@ -732,8 +732,8 @@ CREATE INDEX people_names ON people ((first_name || ' ' || last_name));
 
   
    Index expressions are relatively expensive to maintain, because the
-   derived expression(s) must be computed for each row upon insertion
-   and whenever it is updated.  However, the index expressions are
+   derived expression(s) must be computed for each row insertion
+   and non-HOT update.  However, the index expressions are
    not recomputed during an indexed search, since they are
    already stored in the index.  In both examples above, the system
    sees the query as just WHERE indexedcolumn = 'constant'