pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix pg_mcv_list_items() to produce text[] 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix pg_mcv_list_items() to produce text[] @ 2019-07-05 01:06 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Tomas Vondra @ 2019-07-05 01:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix pg_mcv_list_items() to produce text[] @ 2019-07-05 15:55 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Tomas Vondra @ 2019-07-05 15:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/cc052b423ad7dc92abb3461a096408c3997c36e1 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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-07-05 15:55 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-07-05 01:06 pgsql: Fix pg_mcv_list_items() to produce text[] Tomas Vondra <tomas.vondra@postgresql.org> 2019-07-05 15:55 pgsql: Fix pg_mcv_list_items() to produce text[] Tomas Vondra <tomas.vondra@postgresql.org>
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