diff options
author | Teodor Sigaev <teodor@sigaev.ru> | 2006-05-10 11:39:12 +0000 |
---|---|---|
committer | Teodor Sigaev <teodor@sigaev.ru> | 2006-05-10 11:39:12 +0000 |
commit | c1f39437d0ad38d1f8d76f9ebf904faa9a7aaaf6 (patch) | |
tree | 2a09a68a0499e827feb3f67942188c6ea82aba2f /contrib/intarray/_int_op.c | |
parent | 10dd8df68e6c826186b9900b703051b46ccd6b31 (diff) | |
download | postgresql-c1f39437d0ad38d1f8d76f9ebf904faa9a7aaaf6.tar.gz postgresql-c1f39437d0ad38d1f8d76f9ebf904faa9a7aaaf6.zip |
Some optimizations by Volkan YAZICI <yazicivo@ttnet.net.tr>
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]) { |