Datum enum_gt(PG_FUNCTION_ARGS) { Oid a = PG_GETARG_OID(0); Oid b = PG_GETARG_OID(1); PG_RETURN_BOOL(enum_cmp_internal(a, b, fcinfo) > 0); }
Datum enum_larger(PG_FUNCTION_ARGS) { Oid a = PG_GETARG_OID(0); Oid b = PG_GETARG_OID(1); PG_RETURN_OID(enum_cmp_internal(a, b, fcinfo) > 0 ? a : b); }
Datum enum_cmp(PG_FUNCTION_ARGS) { Oid a = PG_GETARG_OID(0); Oid b = PG_GETARG_OID(1); PG_RETURN_INT32(enum_cmp_internal(a, b, fcinfo)); }
Datum enum_cmp(PG_FUNCTION_ARGS) { Oid a = PG_GETARG_OID(0); Oid b = PG_GETARG_OID(1); if (a == b) PG_RETURN_INT32(0); else if (enum_cmp_internal(a, b, fcinfo) > 0) PG_RETURN_INT32(1); else PG_RETURN_INT32(-1); }