From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix pg_mcv_list_items() to produce text[]
Date: Fri, 05 Jul 2019 01:06:08 +0000
Message-ID: <E1hjCfw-0001aw-Dp@gemulon.postgresql.org> (raw)
Fix pg_mcv_list_items() to produce text[]
The function pg_mcv_list_items() returns values stored in MCV items. The
items may contain columns with different data types, so the function was
generating text array-like representation, but in an ad-hoc way without
properly escaping various characters etc.
Fixed by simply building a text[] array, which also makes it easier to
use from queries etc.
Requires changes to pg_proc entry, so bump catversion.
Backpatch to 12, where multi-column MCV lists were introduced.
Author: Tomas Vondra
Reviewed-by: Dean Rasheed
Discussion: https://postgr.es/m/20190618205920.qtlzcu73whfpfqne@development
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4d66285adc6bb4f9e4fd394d478d663cbccb5fc8
Modified Files
--------------
src/backend/statistics/mcv.c | 128 ++++++++++++--------------------
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 2 +-
src/test/regress/expected/stats_ext.out | 6 +-
4 files changed, 51 insertions(+), 87 deletions(-)
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: Fix pg_mcv_list_items() to produce text[]
In-Reply-To: <E1hjCfw-0001aw-Dp@gemulon.postgresql.org>
References: <E1hjCfw-0001aw-Dp@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