From: Heikki Linnakangas Date: Fri, 30 Oct 2020 17:30:19 +0000 (+0200) Subject: Fix missing validation for the new GiST sortsupport functions. X-Git-Tag: REL_14_BETA1~1395 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=6f0bc5e1daf09686c526aa161da5336f7c94f4eb;p=postgresql.git Fix missing validation for the new GiST sortsupport functions. Because of this, if you tried to create an operator family with the new sortsupport function, you got an error: ERROR: support function number 11 is invalid for access method gist We missed this in commit 16fa9b2b30 that added the sortsupport function, because it only added sortsupport to a built-in operator family. Author: Andrey Borodin Discussion: https://www.postgresql.org/message-id/3520A18A-5C38-4697-A2E3-F3BDE3496CD5%40yandex-team.ru --- diff --git a/src/backend/access/gist/gistvalidate.c b/src/backend/access/gist/gistvalidate.c index 8a14620fab2..e600015b12d 100644 --- a/src/backend/access/gist/gistvalidate.c +++ b/src/backend/access/gist/gistvalidate.c @@ -338,6 +338,7 @@ gistadjustmembers(Oid opfamilyoid, case GIST_DISTANCE_PROC: case GIST_FETCH_PROC: case GIST_OPTIONS_PROC: + case GIST_SORTSUPPORT_PROC: /* Optional, so force it to be a soft family dependency */ op->ref_is_hard = false; op->ref_is_family = true;