pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: When index recurses to a partition, map columns numbers
Date: Fri, 22 Jun 2018 20:51:51 +0000
Message-ID: <E1fWT27-0007u0-H6@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1fWT27-0007u0-H6@gemulon.postgresql.org>
Permalink:  ../E1fWT27-0007u0-H6@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1fWT27-0007u0-H6@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: When index recurses to a partition, map columns numbers
  In-Reply-To: <E1fWT27-0007u0-H6@gemulon.postgresql.org>
  References: <E1fWT27-0007u0-H6@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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