diff options
Diffstat (limited to 'src/backend/catalog/heap.c')
-rw-r--r-- | src/backend/catalog/heap.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index 252e106cada..348943e36cc 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -56,6 +56,7 @@ #include "catalog/storage.h" #include "commands/tablecmds.h" #include "commands/typecmds.h" +#include "common/int.h" #include "miscadmin.h" #include "nodes/nodeFuncs.h" #include "optimizer/optimizer.h" @@ -2762,11 +2763,7 @@ list_cookedconstr_attnum_cmp(const ListCell *p1, const ListCell *p2) AttrNumber v1 = ((CookedConstraint *) lfirst(p1))->attnum; AttrNumber v2 = ((CookedConstraint *) lfirst(p2))->attnum; - if (v1 < v2) - return -1; - if (v1 > v2) - return 1; - return 0; + return pg_cmp_s16(v1, v2); } /* |