1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-21 00:42:43 +03:00

Collect duplicate copies of oid_cmp()

This commit is contained in:
Peter Eisentraut
2017-03-01 11:55:28 -05:00
parent 788af6f854
commit 20f6d74242
5 changed files with 17 additions and 51 deletions

View File

@@ -331,6 +331,20 @@ oidparse(Node *node)
return InvalidOid; /* keep compiler quiet */
}
/* qsort comparison function for Oids */
int
oid_cmp(const void *p1, const void *p2)
{
Oid v1 = *((const Oid *) p1);
Oid v2 = *((const Oid *) p2);
if (v1 < v2)
return -1;
if (v1 > v2)
return 1;
return 0;
}
/*****************************************************************************
* PUBLIC ROUTINES *