pgsql: Fix pg_mcv_list deserialization

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема pgsql: Fix pg_mcv_list deserialization
Дата
Msg-id E1hG9hB-0001rs-IY@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix pg_mcv_list deserialization

The memcpy() was copying type OIDs in the wrong direction, so the
deserialized MCV list always had them as 0. This is mostly harmless
except when printing the data in pg_mcv_list_items(), in which case
it reported

    ERROR:  cache lookup failed for type 0

Also added a simple regression test for pg_mcv_list_items() function,
printing a single-item MCV list.

Reported-By: Dean Rasheed
Discussion: https://postgr.es/m/CAEZATCX6T0iDTTZrqyec4Cd6b4yuL7euu4=rQRXaVBAVrUi1Cg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3824ca30d162611fdaade403d3aec449fecd0924

Modified Files
--------------
src/backend/statistics/mcv.c            |  2 +-
src/test/regress/expected/stats_ext.out | 11 +++++++++++
src/test/regress/sql/stats_ext.sql      |  8 ++++++++
3 files changed, 20 insertions(+), 1 deletion(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix failure with textual partition hash keys.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Use [FLEXIBLE_ARRAY_MEMBER] not [1] in MultiSortSupportData.