pgsql: Fix handling of non-key columns get_index_column_opclass()

From: Alexander Korotkov <akorotkov(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix handling of non-key columns get_index_column_opclass()
Date: 2019-09-09 11:04:27
Message-ID: E1i7HT9-0008Ho-18@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix handling of non-key columns get_index_column_opclass()

f2e40380 introduces support of non-key attributes in GiST indexes. Then if
get_index_column_opclass() is asked by gistproperty() to get an opclass of
non-key column, it returns garbage past oidvector value. This commit fixes
that by making get_index_column_opclass() return InvalidOid in this case.

Discussion: https://postgr.es/m/20190902231948.GA5343%40alvherre.pgsql
Author: Nikita Glukhov, Alexander Korotkov
Backpatch-through: 12

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7e04160390464cd39690d36054e0ac5e4f1bf227

Modified Files
--------------
src/backend/utils/cache/lsyscache.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2019-09-09 11:06:03 pgsql: Fix handling of non-key columns get_index_column_opclass()
Previous Message Peter Eisentraut 2019-09-09 09:44:28 pgsql: Translation updates