[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pgsql-committers
Subject:    pgsql: Don't print extra parens around expressions in extended stats
From:       Tomas Vondra <tomas.vondra () postgresql ! org>
Date:       2021-08-31 23:13:45
Message-ID: E1mLCwr-0006ON-Ox () gemulon ! postgresql ! org
[Download RAW message or body]

[Attachment #2 (text/plain)]

Don't print extra parens around expressions in extended stats

The code printing expressions for extended statistics doubled the
parens, producing results like ((a+1)), which is unnecessary and not
consistent with how we print expressions elsewhere.

Fixed by tweaking the code to produce just a single set of parens.

Reported by Mark Dilger, fix by me. Backpatch to 14, where support for
extended statistics on expressions was added.

Reported-by: Mark Dilger
Discussion: https://postgr.es/m/20210122040101.GF27167%40telsasoft.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/13380e1476490932c7b15530ead1f649a16e1125

Modified Files
--------------
src/backend/utils/adt/ruleutils.c               |   2 +-
src/bin/pg_dump/t/002_pg_dump.pl                |   2 +-
src/test/regress/expected/create_table_like.out |   6 +-
src/test/regress/expected/stats_ext.out         | 110 ++++++++++++------------
4 files changed, 60 insertions(+), 60 deletions(-)



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic