mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Please apply attached patch to contrib/intarray (7.2, 7.3).
Fixed bug with '=' operator for gist__int_ops and define '=' operator for gist__intbig_ops opclass. Now '=' operator is consistent with standard 'array' type. Thanks Achilleus Mantzios for bug report and suggestion. Oleg Bartunov
This commit is contained in:
@ -312,6 +312,17 @@ g_int_consistent(PG_FUNCTION_ARGS) {
|
||||
query);
|
||||
break;
|
||||
case RTSameStrategyNumber:
|
||||
if ( GIST_LEAF(entry) )
|
||||
DirectFunctionCall3(
|
||||
g_int_same,
|
||||
entry->key,
|
||||
PointerGetDatum(query),
|
||||
PointerGetDatum(&retval)
|
||||
);
|
||||
else
|
||||
retval = inner_int_contains((ArrayType *) DatumGetPointer(entry->key),
|
||||
query);
|
||||
break;
|
||||
case RTContainsStrategyNumber:
|
||||
retval = inner_int_contains((ArrayType *) DatumGetPointer(entry->key),
|
||||
query);
|
||||
@ -1263,6 +1274,16 @@ g_intbig_consistent(PG_FUNCTION_ARGS) {
|
||||
retval = _intbig_overlap((ArrayType *) DatumGetPointer(entry->key), q);
|
||||
break;
|
||||
case RTSameStrategyNumber:
|
||||
if ( GIST_LEAF(entry) )
|
||||
DirectFunctionCall3(
|
||||
g_intbig_same,
|
||||
entry->key,
|
||||
PointerGetDatum(q),
|
||||
PointerGetDatum(&retval)
|
||||
);
|
||||
else
|
||||
retval = _intbig_contains((ArrayType *) DatumGetPointer(entry->key), q);
|
||||
break;
|
||||
case RTContainsStrategyNumber:
|
||||
retval = _intbig_contains((ArrayType *) DatumGetPointer(entry->key), q);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user