diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-11-12 21:15:59 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-11-12 21:15:59 +0000 |
commit | fa5c8a055a02e44f446e4593e397c33a572c4d67 (patch) | |
tree | 9c0a7ded5a88c082c28dbe2b431660813abd72b8 /src/backend/utils/adt/selfuncs.c | |
parent | 49f98fa833407b4e4252e42522e640ec8a0d08b2 (diff) |
Cross-data-type comparisons are now indexable by btrees, pursuant to my
pghackers proposal of 8-Nov. All the existing cross-type comparison
operators (int2/int4/int8 and float4/float8) have appropriate support.
The original proposal of storing the right-hand-side datatype as part of
the primary key for pg_amop and pg_amproc got modified a bit in the event;
it is easier to store zero as the 'default' case and only store a nonzero
when the operator is actually cross-type. Along the way, remove the
long-since-defunct bigbox_ops operator class.
Diffstat (limited to 'src/backend/utils/adt/selfuncs.c')
-rw-r--r-- | src/backend/utils/adt/selfuncs.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index 978c0201466..3c4b780c56c 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -15,7 +15,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.147 2003/10/16 21:37:54 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.148 2003/11/12 21:15:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -952,7 +952,8 @@ patternsel(PG_FUNCTION_ARGS, Pattern_Type ptype) /* * Pattern specifies an exact match, so pretend operator is '=' */ - Oid eqopr = get_opclass_member(opclass, BTEqualStrategyNumber); + Oid eqopr = get_opclass_member(opclass, InvalidOid, + BTEqualStrategyNumber); List *eqargs; if (eqopr == InvalidOid) @@ -3382,7 +3383,8 @@ prefix_selectivity(Query *root, Var *var, Oid opclass, Const *prefixcon) List *cmpargs; Const *greaterstrcon; - cmpopr = get_opclass_member(opclass, BTGreaterEqualStrategyNumber); + cmpopr = get_opclass_member(opclass, InvalidOid, + BTGreaterEqualStrategyNumber); if (cmpopr == InvalidOid) elog(ERROR, "no >= operator for opclass %u", opclass); cmpargs = makeList2(var, prefixcon); @@ -3403,7 +3405,8 @@ prefix_selectivity(Query *root, Var *var, Oid opclass, Const *prefixcon) { Selectivity topsel; - cmpopr = get_opclass_member(opclass, BTLessStrategyNumber); + cmpopr = get_opclass_member(opclass, InvalidOid, + BTLessStrategyNumber); if (cmpopr == InvalidOid) elog(ERROR, "no < operator for opclass %u", opclass); cmpargs = makeList2(var, greaterstrcon); |