From 0cc99327888840f2bf572303b68438e4caf62de9 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 23 Nov 2020 11:38:37 -0500 Subject: Rename the "point is strictly above/below point" comparison operators. Historically these were called >^ and <^, but that is inconsistent with the similar box, polygon, and circle operators, which are named |>> and <<| respectively. Worse, the >^ and <^ names are used for *not* strict above/below tests for the box type. Hence, invent new operators following the more common naming. The old operators remain available for now, and are still accepted by the relevant index opclasses too. But there's a deprecation notice, so maybe we can get rid of them someday. Emre Hasegeli, reviewed by Pavel Borisov Discussion: https://postgr.es/m/24348.1587444160@sss.pgh.pa.us --- src/backend/access/gist/gistproc.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/backend/access/gist/gistproc.c') diff --git a/src/backend/access/gist/gistproc.c b/src/backend/access/gist/gistproc.c index b03c4b55a0c..784807c636b 100644 --- a/src/backend/access/gist/gistproc.c +++ b/src/backend/access/gist/gistproc.c @@ -1341,8 +1341,18 @@ gist_point_consistent(PG_FUNCTION_ARGS) StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2); bool *recheck = (bool *) PG_GETARG_POINTER(4); bool result; - StrategyNumber strategyGroup = strategy / GeoStrategyNumberOffset; + StrategyNumber strategyGroup; + + /* + * We have to remap these strategy numbers to get this klugy + * classification logic to work. + */ + if (strategy == RTOldBelowStrategyNumber) + strategy = RTBelowStrategyNumber; + else if (strategy == RTOldAboveStrategyNumber) + strategy = RTAboveStrategyNumber; + strategyGroup = strategy / GeoStrategyNumberOffset; switch (strategyGroup) { case PointStrategyNumberGroup: -- cgit v1.2.3