diff options
Diffstat (limited to 'contrib/intarray/_int_op.c')
-rw-r--r-- | contrib/intarray/_int_op.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/intarray/_int_op.c b/contrib/intarray/_int_op.c index 7a2065bc214..036c357fb07 100644 --- a/contrib/intarray/_int_op.c +++ b/contrib/intarray/_int_op.c @@ -83,8 +83,6 @@ _int_same(PG_FUNCTION_ARGS) if (avoid || bvoid) return (avoid && bvoid) ? TRUE : FALSE; - SORT(a); - SORT(b); na = ARRNELEMS(a); nb = ARRNELEMS(b); da = ARRPTR(a); @@ -94,7 +92,10 @@ _int_same(PG_FUNCTION_ARGS) if (na == nb) { + SORT(a); + SORT(b); result = TRUE; + for (n = 0; n < na; n++) if (da[n] != db[n]) { |