pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Don't print extra parens around expressions in extended stats
Date: Tue, 31 Aug 2021 23:13:45 +0000
Message-ID: <E1mLCwr-0006ON-Ox@gemulon.postgresql.org> (raw)

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(-)



view thread (2+ messages)

Message-ID: <E1mLCwr-0006ON-Ox@gemulon.postgresql.org>
Permalink:  ../E1mLCwr-0006ON-Ox@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1mLCwr-0006ON-Ox@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tomas.vondra@postgresql.org
  Subject: Re: pgsql: Don't print extra parens around expressions in extended stats
  In-Reply-To: <E1mLCwr-0006ON-Ox@gemulon.postgresql.org>
  References: <E1mLCwr-0006ON-Ox@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox