postgres-github.git / summary / log / commit / refs

commit    a28fa2947d2a507089605c47bbfa9016d457208c
Author:   Michael Paquier <michael@paquier.xyz>
Date:     Mon May 18 04:18:35 2026 +0000

    Fix issues with handling of expressions in extended stats restore
    
    This commit addresses some defects with the handling of expressions in
    pg_restore_extended_stats() and pg_clear_extended_stats():
    - Misleading WARNING for an incorrect number of expressions, where the
    number of required expressions was reported as the number of elements
    given in input rather than the actual number of expressions expected by
    the extstats object definition.
    - Incorrect matching of expression names, where a key name was
    considered as valid as long as it matched with the prefix of a legit key
    name.  For example "correlatio" given in input would match with
    "correlation", and be considered valid.  The consequence of this bug was
    a silent discard of the input data, where the operation would be
    considered a success.  The value associated to the prefixed key was not
    inserted in the catalogs, just ignored.  pg_dump would not generate such
    input data patterns, but a user doing manual stats injection could.
    - Missing heap_freetuple() in pg_clear_extended_stats(), for the case
    where the extstats object in input does not match with its parent
    relation.
    
    Author: Chao Li <li.evan.chao@gmail.com>
    Discussion: https://postgr.es/m/A7C11B83-7534-4A09-9071-FBD09175CFC8@gmail.com

[parent: a120ecf54985]