pgsql: When index recurses to a partition, map columns numbers

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема pgsql: When index recurses to a partition, map columns numbers
Дата
Msg-id E1fWT27-0007u0-H6@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
When index recurses to a partition, map columns numbers

Two out of three code paths were mapping column numbers correctly if a
partition had different column numbers than parent table, but the most
commonly used one (recursing in CREATE INDEX to a new index on a
partition) failed to map attribute numbers in expressions.  Oddly
enough, attnums in WHERE clauses are already handled correctly
everywhere.

Reported-by: Amit Langote
Author: Amit Langote
Discussion: https://postgr.es/m/dce1fda4-e0f0-94c9-6abb-f5956a98c057@lab.ntt.co.jp
Reviewed-by: Álvaro Herrera

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/475be5e790e2db4c5c18a2d378c4498ffccb6289

Modified Files
--------------
src/backend/commands/indexcmds.c       | 25 +++++++++++++++++++++++++
src/test/regress/expected/indexing.out | 16 ++++++++++------
src/test/regress/sql/indexing.sql      |  1 +
3 files changed, 36 insertions(+), 6 deletions(-)


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: pgsql: Avoid generating bogus paths with partitionwise aggregate.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Allow for pg_upgrade of attributes with missing values