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:
@@ -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 *
|
||||
|
||||
Reference in New Issue
Block a user