• Tom Lane's avatar
    Teach contrib/pg_stat_statements to handle multi-statement commands better. · 83f2061d
    Tom Lane authored
    Make use of the statement boundary info added by commit ab1f0c82
    to let pg_stat_statements behave more sanely when multiple SQL queries
    are jammed into one query string.  It now records just the relevant
    part of the source string, not the whole thing, for each individual
    query.
    
    Even when no multi-statement strings are involved, users may notice small
    changes in the output: leading and trailing whitespace and semicolons will
    be stripped from statements, which did not happen before.
    
    Also, significantly expand pg_stat_statements' regression test script.
    
    Fabien Coelho, reviewed by Craig Ringer and Kyotaro Horiguchi,
    some mods by me
    
    Discussion: https://postgr.es/m/alpine.DEB.2.20.1612200926310.29821@lancre
    83f2061d
pg_stat_statements.out 8.33 KB