mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
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
This commit is contained in:
@@ -53,6 +53,6 @@
|
||||
*/
|
||||
|
||||
/* yyyymmddN */
|
||||
#define CATALOG_VERSION_NO 201906161
|
||||
#define CATALOG_VERSION_NO 201907031
|
||||
|
||||
#endif
|
||||
|
@@ -5019,7 +5019,7 @@
|
||||
{ oid => '3427', descr => 'details about MCV list items',
|
||||
proname => 'pg_mcv_list_items', prorows => '1000', proretset => 't',
|
||||
provolatile => 's', prorettype => 'record', proargtypes => 'pg_mcv_list',
|
||||
proallargtypes => '{pg_mcv_list,int4,text,_bool,float8,float8}',
|
||||
proallargtypes => '{pg_mcv_list,int4,_text,_bool,float8,float8}',
|
||||
proargmodes => '{i,o,o,o,o,o}',
|
||||
proargnames => '{mcv_list,index,values,nulls,frequency,base_frequency}',
|
||||
prosrc => 'pg_stats_ext_mcvlist_items' },
|
||||
|
Reference in New Issue
Block a user