-/*
- * This routine selects an appropriate sorting function to implement
- * a sort operator as efficiently as possible.
- */
-typedef enum
-{
- SORTFUNC_LT, /* raw "<" operator */
- SORTFUNC_REVLT, /* raw "<" operator, but reverse NULLs */
- SORTFUNC_CMP, /* -1 / 0 / 1 three-way comparator */
- SORTFUNC_REVCMP /* 1 / 0 / -1 (reversed) 3-way comparator */
-} SortFunctionKind;
-
-extern void SelectSortFunction(Oid sortOperator,
- RegProcedure *sortFunction,
- SortFunctionKind *kind);
-
-/*
- * Apply a sort function (by now converted to fmgr lookup form)
- * and return a 3-way comparison result. This takes care of handling
- * NULLs and sort ordering direction properly.
- */
-extern int32 ApplySortFunction(FmgrInfo *sortFunction, SortFunctionKind kind,
- Datum datum1, bool isNull1,
- Datum datum2, bool isNull2);
-