Fix pg_mcv_list_items() to produce text[]
Tomas Vondra <tomas.vondra@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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/statistics/mcv.c | modified | +46 −82 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.dat | modified | +1 −1 |
| src/test/regress/expected/stats_ext.out | modified | +3 −3 |
Discussion
- Choosing values for multivariate MCV lists 15 messages · 2019-06-18 → 2019-07-02