From: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
---|---|
To: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
Cc: | Jaime Casanova <jaime(dot)casanova(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Partitioned tables and covering indexes |
Date: | 2018-04-11 19:30:21 |
Message-ID: | 13123421-1d52-d0e4-c95c-6d69011e0595@sigaev.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Actually, discovered bug is not related to patch except new test faces
> with it,
> problem is: CompareIndexInfo() checks rd_opfamily for equality for all
> attributes, not only for key attribute.
Patch attached. But it seems to me, field's names of
IndexInfo structure are a bit confused now:
int ii_NumIndexAttrs; /* total number of columns in index */
int ii_NumIndexKeyAttrs; /* number of key columns in
index */
AttrNumber ii_KeyAttrNumbers[INDEX_MAX_KEYS];
ii_KeyAttrNumbers contains all columns, i.e. it contains
ii_NumIndexAttrs number of columns, not a ii_NumIndexKeyAttrs number as
easy to think.
I suggest rename ii_KeyAttrNumbers to ii_AttrNumbers or
ii_IndexAttrNumbers. Opinions?
> for (i = 0; i < info1->ii_NumIndexAttrs; i++)
> {
> if (maplen < info2->ii_KeyAttrNumbers[i])
>
--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/
Attachment | Content-Type | Size |
---|---|---|
CompareIndexInfo.patch | text/x-patch | 932 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2018-04-11 19:47:53 | Re: Partitioned tables and covering indexes |
Previous Message | Chapman Flack | 2018-04-11 19:13:52 | Re: lazy detoasting |