diff options
| author | Peter Eisentraut | 2025-01-15 10:28:39 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2025-01-15 10:34:04 +0000 |
| commit | 630f9a43cece93cb4a5c243b30e34abce6a89514 (patch) | |
| tree | ef3a4a65f971bd526919b0ee67fad92bb4590ef9 /src/backend/catalog | |
| parent | 6339f6468e8217f556e38482626250dc72d7cd00 (diff) | |
Change gist stratnum function to use CompareType
This changes commit 7406ab623fe in that the gist strategy number
mapping support function is changed to use the CompareType enum as
input, instead of the "well-known" RT*StrategyNumber strategy numbers.
This is a bit cleaner, since you are not dealing with two sets of
strategy numbers. Also, this will enable us to subsume this system
into a more general system of using CompareType to define operator
semantics across index methods.
Discussion: https://www.postgresql.org/message-id/flat/[email protected]
Diffstat (limited to 'src/backend/catalog')
| -rw-r--r-- | src/backend/catalog/pg_constraint.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/backend/catalog/pg_constraint.c b/src/backend/catalog/pg_constraint.c index 8693ec3c884..bbf4742e18c 100644 --- a/src/backend/catalog/pg_constraint.c +++ b/src/backend/catalog/pg_constraint.c @@ -1647,22 +1647,22 @@ FindFKPeriodOpers(Oid opclass, * of the old value, then we can treat the attribute as if it didn't * change, and skip the RI check. */ - strat = RTContainedByStrategyNumber; - GetOperatorFromWellKnownStrategy(opclass, - InvalidOid, - containedbyoperoid, - &strat); + GetOperatorFromCompareType(opclass, + InvalidOid, + COMPARE_CONTAINED_BY, + containedbyoperoid, + &strat); /* * Now look up the ContainedBy operator. Its left arg must be the type of * the column (or rather of the opclass). Its right arg must match the * return type of the support proc. */ - strat = RTContainedByStrategyNumber; - GetOperatorFromWellKnownStrategy(opclass, - ANYMULTIRANGEOID, - aggedcontainedbyoperoid, - &strat); + GetOperatorFromCompareType(opclass, + ANYMULTIRANGEOID, + COMPARE_CONTAINED_BY, + aggedcontainedbyoperoid, + &strat); } /* |
