From c266ed31a8a3beed3533e6a78faeca78234cbd43 Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Thu, 12 Apr 2018 16:37:22 +0300 Subject: Cleanup covering infrastructure - Explicitly forbids opclass, collation and indoptions (like DESC/ASC etc) for including columns. Throw an error if user points that. - Truncated storage arrays for such attributes to store only key atrributes, added assertion checks. - Do not check opfamily and collation for including columns in CompareIndexInfo() Discussion: https://www.postgresql.org/message-id/5ee72852-3c4e-ee35-e2ed-c1d053d45c08@sigaev.ru --- src/backend/utils/adt/selfuncs.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/backend/utils/adt/selfuncs.c') diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index fe606d72798..4b08cdb721a 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -7437,6 +7437,8 @@ gincost_pattern(IndexOptInfo *index, int indexcol, int32 searchMode = GIN_SEARCH_MODE_DEFAULT; int32 i; + Assert(indexcol < index->nkeycolumns); + /* * Get the operator's strategy number and declared input data types within * the index opfamily. (We don't need the latter, but we use -- cgit v1.2.3