From 56e7f7326155c5ed73f22a444a546f2e7054af7f Mon Sep 17 00:00:00 2001
From: Peter Geoghegan <pg@heroku.com>
Date: Tue, 2 Sep 2014 18:16:41 -0700
Subject: [PATCH 3/5] Rename items in Tuplesortstate/SortSupport/varlena.c

Per feedback from Robert Haas.
---
 src/backend/commands/analyze.c         |  2 +-
 src/backend/executor/nodeMergeAppend.c |  2 +-
 src/backend/executor/nodeMergejoin.c   |  2 +-
 src/backend/lib/hyperloglog.c          |  2 +-
 src/backend/utils/adt/varlena.c        | 57 ++++++++++++++++----------------
 src/backend/utils/sort/tuplesort.c     | 60 +++++++++++++++++-----------------
 src/include/lib/hyperloglog.h          |  2 +-
 src/include/utils/sortsupport.h        | 40 +++++++++++------------
 8 files changed, 84 insertions(+), 83 deletions(-)

diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index adf4b8c..6f5c59c 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -2297,7 +2297,7 @@ compute_scalar_stats(VacAttrStatsP stats,
 	 * are required for MCV slot generation.  Supporting that optimization
 	 * would necessitate teaching compare_scalars() to call a tie-breaker.
 	 */
-	ssup.position = sortKeyOther;
+	ssup.abbrev_state = ABBREVIATED_KEYS_NO;
 
 	PrepareSortSupportFromOrderingOp(mystats->ltopr, &ssup);
 
diff --git a/src/backend/executor/nodeMergeAppend.c b/src/backend/executor/nodeMergeAppend.c
index 677a953..1e7a6dc 100644
--- a/src/backend/executor/nodeMergeAppend.c
+++ b/src/backend/executor/nodeMergeAppend.c
@@ -144,7 +144,7 @@ ExecInitMergeAppend(MergeAppend *node, EState *estate, int eflags)
 		 * representation as they're pulled up, so opt out of that additional
 		 * optimization entirely.
 		 */
-		sortKey->position = sortKeyOther;
+		sortKey->abbrev_state = ABBREVIATED_KEYS_NO;
 
 		PrepareSortSupportFromOrderingOp(node->sortOperators[i], sortKey);
 	}
diff --git a/src/backend/executor/nodeMergejoin.c b/src/backend/executor/nodeMergejoin.c
index 39f0ff1..030de88 100644
--- a/src/backend/executor/nodeMergejoin.c
+++ b/src/backend/executor/nodeMergejoin.c
@@ -235,7 +235,7 @@ MJExamineQuals(List *mergeclauses,
 		 * because there is no convenient opportunity to convert to alternative
 		 * representation.  Only elide fmgr trampoline where supported.
 		 */
-		clause->ssup.position = sortKeyOther;
+		clause->ssup.abbrev_state = ABBREVIATED_KEYS_NO;
 
 		/* And get the matching support or comparison function */
 		Assert(clause->ssup.comparator == NULL);
diff --git a/src/backend/lib/hyperloglog.c b/src/backend/lib/hyperloglog.c
index 4db42bf..1157e9a 100644
--- a/src/backend/lib/hyperloglog.c
+++ b/src/backend/lib/hyperloglog.c
@@ -14,7 +14,7 @@
  * A sparse representation of HyperLogLog state is used, with fixed space
  * overhead.
  *
- * The copyright term's of Ohno's original version (the MIT license) follow.
+ * The copyright terms of Ohno's original version (the MIT license) follow.
  *
  * IDENTIFICATION
  *	  src/backend/lib/hyperloglog.c
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index 96df4a9..062035f 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -88,11 +88,12 @@ typedef struct
 #define LOG2(x)  (log(x) / 0.693147180559945)
 
 static void btsortsupport_worker(SortSupport ssup, Oid collid);
-static int bttextcmp_abbreviated(Datum x, Datum y, SortSupport ssup);
+static int bttextcmp_abbrev(Datum x, Datum y, SortSupport ssup);
 static int bttextfastcmp_c(Datum x, Datum y, SortSupport ssup);
 static int bttextfastcmp_locale(Datum x, Datum y, SortSupport ssup);
-static Datum bttext_convert(Datum original, SortSupport ssup);
-static bool bttext_abort(int memtupcount, double rowhint, SortSupport ssup);
+static Datum bttext_abbrev_convert(Datum original, SortSupport ssup);
+static bool bttext_abbrev_abort(int memtupcount, double rowhint, SortSupport
+								ssup);
 static int32 text_length(Datum str);
 static text *text_catenate(text *t1, text *t2);
 static text *text_substring(Datum str,
@@ -1796,7 +1797,7 @@ btsortsupport_worker(SortSupport ssup, Oid collid)
 	 * resolved with just 8 byte abbreviated keys, this optimization is very
 	 * effective (although if there are many tie-breakers that largely only
 	 * perform cheap memcmp() calls, that is also much faster than the
-	 * unoptimized case - see bttext_abort()).
+	 * unoptimized case - see bttext_abbrev_abort()).
 	 *
 	 * There is no reason to not at least perform fmgr elision on platforms
 	 * where abbreviation isn't expected to be profitable, though.
@@ -1838,7 +1839,7 @@ btsortsupport_worker(SortSupport ssup, Oid collid)
 #endif
 	}
 
-	if (ssup->position != sortKeyAbbreviated)
+	if (ssup->abbrev_state != ABBREVIATED_KEYS_YES)
 	{
 		/*
 		 * If LC_COLLATE = C, we can make things quite a bit faster by using
@@ -1879,30 +1880,30 @@ btsortsupport_worker(SortSupport ssup, Oid collid)
 	initHyperLogLog(&tss->abbr_card, 10);
 	initHyperLogLog(&tss->full_card, 10);
 
-	ssup->comparator = bttextcmp_abbreviated;
-	ssup->converter = bttext_convert;
-	ssup->abort_conversion = bttext_abort;
+	ssup->comparator = bttextcmp_abbrev;
+	ssup->abbrev_converter = bttext_abbrev_convert;
+	ssup->abbrev_abort = bttext_abbrev_abort;
 
-	ssup->tiebreak = palloc0(sizeof(SortSupportData));
-	ssup->tiebreak->ssup_cxt = ssup->ssup_cxt;
-	ssup->tiebreak->ssup_collation = ssup->ssup_collation;
-	ssup->tiebreak->ssup_reverse = ssup->ssup_reverse;
-	ssup->tiebreak->ssup_nulls_first = ssup->ssup_nulls_first;
-	ssup->tiebreak->ssup_attno = ssup->ssup_attno;
+	ssup->abbrev_tiebreak = palloc0(sizeof(SortSupportData));
+	ssup->abbrev_tiebreak->ssup_cxt = ssup->ssup_cxt;
+	ssup->abbrev_tiebreak->ssup_collation = ssup->ssup_collation;
+	ssup->abbrev_tiebreak->ssup_reverse = ssup->ssup_reverse;
+	ssup->abbrev_tiebreak->ssup_nulls_first = ssup->ssup_nulls_first;
+	ssup->abbrev_tiebreak->ssup_attno = ssup->ssup_attno;
 
 	/*
 	 * Initialize tiebreak sortsupport state with an authoritative
 	 * strcoll()-based comparison func for tie-breaking.
 	 */
-	ssup->tiebreak->position = sortKeyTiebreak;
-	btsortsupport_worker(ssup->tiebreak, collid);
+	ssup->abbrev_tiebreak->abbrev_state = ABBREVIATED_KEYS_TIE;
+	btsortsupport_worker(ssup->abbrev_tiebreak, collid);
 }
 
 /*
  * Abbreviated key comparison func
  */
 static int
-bttextcmp_abbreviated(Datum x, Datum y, SortSupport ssup)
+bttextcmp_abbrev(Datum x, Datum y, SortSupport ssup)
 {
 	char   *a = (char *) &x;
 	char   *b = (char *) &y;
@@ -1975,7 +1976,7 @@ bttextfastcmp_locale(Datum x, Datum y, SortSupport ssup)
 	len1 = VARSIZE_ANY_EXHDR(arg1);
 	len2 = VARSIZE_ANY_EXHDR(arg2);
 
-	if (ssup->position == sortKeyTiebreak && len1 == len2)
+	if (ssup->abbrev_state == ABBREVIATED_KEYS_TIE && len1 == len2)
 	{
 		/*
 		 * Being called as authoritative tie-breaker for an abbreviated key
@@ -1992,7 +1993,7 @@ bttextfastcmp_locale(Datum x, Datum y, SortSupport ssup)
 		 * almost certainly bottlenecked on memory latency.
 		 *
 		 * Original, authoritative key cardinality is weighed within
-		 * bttext_abort().  Cases where attempts at resolving tie-breakers in
+		 * bttext_abbrev_abort().  Cases where attempts at resolving tie-breakers in
 		 * this manner are the usual outcome, and yet those attempts usually
 		 * fail should only arise infrequently.
 		 */
@@ -2053,7 +2054,7 @@ done:
  * bytes of a strxfrm() blob into a Datum.
  */
 static Datum
-bttext_convert(Datum original, SortSupport ssup)
+bttext_abbrev_convert(Datum original, SortSupport ssup)
 {
 	TextSortSupport	   *tss = (TextSortSupport *) ssup->ssup_extra;
 	text			   *authoritative = DatumGetTextPP(original);
@@ -2069,14 +2070,14 @@ bttext_convert(Datum original, SortSupport ssup)
 
 	/*
 	 * Abbreviated key representation is a pass-by-value Datum that is treated
-	 * as a char array by the specialized comparator bttextcmp_abbreviated().
+	 * as a char array by the specialized comparator bttextcmp_abbrev().
 	 */
 	pres = (char *) &res;
-	/* memset() so untouched bytes are NULL */
+	/* memset(), so any non-overwritten bytes are NUL */
 	memset(pres, 0, sizeof(Datum));
 	len = VARSIZE_ANY_EXHDR(authoritative);
 
-	/* By convention, we use buffer 1 to store and NULL terminate text */
+	/* By convention, we use buffer 1 to store and NUL-terminate text */
 	if (len >= tss->buflen1)
 	{
 		pfree(tss->buf1);
@@ -2084,7 +2085,7 @@ bttext_convert(Datum original, SortSupport ssup)
 		tss->buf1 = palloc(tss->buflen1);
 	}
 
-	/* Just like strcoll(), strxfrm() expects a NULL-terminated string */
+	/* Just like strcoll(), strxfrm() expects a NUL-terminated string */
 	memcpy(tss->buf1, VARDATA_ANY(authoritative), len);
 	tss->buf1[len] = '\0';
 
@@ -2122,7 +2123,7 @@ retry:
 	 * authoritative keys using HyperLogLog.  Used as cheap insurance against
 	 * the worst case, where we do many string transformations for no saving in
 	 * full strcoll()-based comparisons.  These statistics are used by
-	 * bttext_abort().
+	 * bttext_abbrev_abort().
 	 *
 	 * First, Hash key proper, or a significant fraction of it.  Mix in length
 	 * in order to compensate for cases where differences are past
@@ -2146,7 +2147,7 @@ retry:
 
 	/*
 	 * Every Datum byte is compared.  This is safe because the strxfrm() blob
-	 * is itself NULL-terminated, leaving no danger of misinterpreting any NULL
+	 * is itself NUL terminated, leaving no danger of misinterpreting any NUL
 	 * bytes not intended to be interpreted as logically representing
 	 * termination.
 	 */
@@ -2159,14 +2160,14 @@ retry:
  * should be aborted, based on its projected effectiveness.
  */
 static bool
-bttext_abort(int memtupcount, double rowhint, SortSupport ssup)
+bttext_abbrev_abort(int memtupcount, double rowhint, SortSupport ssup)
 {
 	TextSortSupport	   *tss = (TextSortSupport *) ssup->ssup_extra;
 	double				abbrev_distinct,
 						key_distinct,
 						norm_key_card;
 
-	Assert(ssup->position == sortKeyAbbreviated);
+	Assert(ssup->abbrev_state == ABBREVIATED_KEYS_YES);
 
 	/* Have a little patience, even without a rowhint */
 	if (memtupcount < 20)
diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c
index b0041b9..d4a314d 100644
--- a/src/backend/utils/sort/tuplesort.c
+++ b/src/backend/utils/sort/tuplesort.c
@@ -360,9 +360,9 @@ struct Tuplesortstate
 	 * (currently only used in the MinimalTuple  case).  Tracks the intervals
 	 * at which the optimization's effectiveness is tested.
 	 */
-	int			nextabbrev;		/* Tuple # at which to next check applicability */
-	bool		aborted;		/* Abbreviation process aborted? */
-	double		rowsHint;		/* Hint # rows to be sorted, -1 if unknown */
+	int			abbrevNext;		/* Tuple # at which to next check applicability */
+	bool		abbrevAborted;	/* Abbreviation process now aborted? */
+	double		abbrevRowsHint;	/* Hint # rows to be sorted, -1 if unknown */
 
 	/*
 	 * These variables are specific to the CLUSTER case; they are set by
@@ -645,8 +645,8 @@ tuplesort_begin_heap(TupleDesc tupDesc,
 	state->reversedirection = reversedirection_heap;
 
 	state->tupDesc = tupDesc;	/* assume we need not copy tupDesc */
-	state->nextabbrev = 10;
-	state->rowsHint = planRows;
+	state->abbrevNext = 10;
+	state->abbrevRowsHint = planRows;
 
 	/* Prepare SortSupport data for each column */
 	state->sortKeys = (SortSupport) palloc0(nkeys * sizeof(SortSupportData));
@@ -668,9 +668,9 @@ tuplesort_begin_heap(TupleDesc tupDesc,
 		 * applicable in principle
 		 */
 		if (i == 0)
-			sortKey->position = sortKeyAbbreviated;
+			sortKey->abbrev_state = ABBREVIATED_KEYS_YES;
 		else
-			sortKey->position = sortKeyOther;
+			sortKey->abbrev_state = ABBREVIATED_KEYS_NO;
 
 		PrepareSortSupportFromOrderingOp(sortOperators[i], sortKey);
 	}
@@ -681,7 +681,7 @@ tuplesort_begin_heap(TupleDesc tupDesc,
 	 * only of value to pass-by-value types anyway, whereas abbreviated keys
 	 * are typically only of value to pass-by-reference types.
 	 */
-	if (nkeys == 1 && !state->sortKeys->converter)
+	if (nkeys == 1 && !state->sortKeys->abbrev_converter)
 		state->onlyKey = state->sortKeys;
 
 	MemoryContextSwitchTo(oldcontext);
@@ -874,7 +874,7 @@ tuplesort_begin_datum(Oid datumType, Oid sortOperator, Oid sortCollation,
 	 * tuplesort_getdatum(), which would require special-case preservation of
 	 * original values that we prefer to avoid.
 	 */
-	state->onlyKey->position = sortKeyOther;
+	state->onlyKey->abbrev_state = ABBREVIATED_KEYS_NO;
 	state->onlyKey->ssup_cxt = CurrentMemoryContext;
 	state->onlyKey->ssup_collation = sortCollation;
 	state->onlyKey->ssup_nulls_first = nullsFirstFlag;
@@ -928,10 +928,10 @@ tuplesort_set_bound(Tuplesortstate *state, int64 bound)
 	 * Bounded sorts are not an effective target for abbreviated key
 	 * optimization.  Disable.
 	 */
-	if (state->sortKeys && state->sortKeys->converter)
+	if (state->sortKeys && state->sortKeys->abbrev_converter)
 	{
-		state->sortKeys = state->sortKeys->tiebreak;
-		state->sortKeys->position = sortKeyOther;
+		state->sortKeys = state->sortKeys->abbrev_tiebreak;
+		state->sortKeys->abbrev_state = ABBREVIATED_KEYS_NO;
 	}
 }
 
@@ -2908,7 +2908,7 @@ comparetup_heap(const SortTuple *a, const SortTuple *b, Tuplesortstate *state)
 	int			nkey;
 	int32		compare;
 
-	if (!state->aborted)
+	if (!state->abbrevAborted)
 	{
 		/* Compare the leading sort key */
 		compare = ApplySortComparator(a->datum1, a->isnull1,
@@ -2931,7 +2931,7 @@ comparetup_heap(const SortTuple *a, const SortTuple *b, Tuplesortstate *state)
 	 * representation, which may break tie when differences were not captured
 	 * within abbreviated representation
 	 */
-	if (state->sortKeys->converter)
+	if (state->sortKeys->abbrev_converter)
 	{
 		AttrNumber	attno = sortKey->ssup_attno;
 		Datum		datum1,
@@ -2939,16 +2939,16 @@ comparetup_heap(const SortTuple *a, const SortTuple *b, Tuplesortstate *state)
 		bool		isnull1,
 					isnull2;
 
-		Assert(attno == sortKey->tiebreak->ssup_attno);
-		Assert(sortKey->position == sortKeyAbbreviated);
-		Assert(sortKey->tiebreak->position == sortKeyTiebreak);
+		Assert(attno == sortKey->abbrev_tiebreak->ssup_attno);
+		Assert(sortKey->abbrev_state == ABBREVIATED_KEYS_YES);
+		Assert(sortKey->abbrev_tiebreak->abbrev_state == ABBREVIATED_KEYS_TIE);
 
 		datum1 = heap_getattr(&ltup, attno, tupDesc, &isnull1);
 		datum2 = heap_getattr(&rtup, attno, tupDesc, &isnull2);
 
 		compare = ApplySortComparator(datum1, isnull1,
 									  datum2, isnull2,
-									  sortKey->tiebreak);
+									  sortKey->abbrev_tiebreak);
 		if (compare != 0)
 			return compare;
 	}
@@ -2995,10 +2995,10 @@ copytup_heap(Tuplesortstate *state, SortTuple *stup, void *tup)
 	htup.t_data = (HeapTupleHeader) ((char *) tuple - MINIMAL_TUPLE_OFFSET);
 
 	/* Once aborted, we give up on storing anything in datum1 entirely */
-	if (state->aborted)
+	if (state->abbrevAborted)
 		return;
 
-	if (!state->sortKeys->converter)
+	if (!state->sortKeys->abbrev_converter)
 	{
 		/* Store ordinary Datum representation */
 		stup->datum1 = heap_getattr(&htup,
@@ -3017,17 +3017,17 @@ copytup_heap(Tuplesortstate *state, SortTuple *stup, void *tup)
 		if (stup->isnull1)
 			stup->datum1 = original;
 		else
-			stup->datum1 = state->sortKeys->converter(original,
+			stup->datum1 = state->sortKeys->abbrev_converter(original,
 													  state->sortKeys);
 
-		if (state->memtupcount >= state->nextabbrev)
+		if (state->memtupcount >= state->abbrevNext)
 		{
 			/* Check effectiveness of optimization.  Consider aborting. */
-			state->nextabbrev *= 2;
-			if (state->sortKeys->abort_conversion(state->memtupcount,
-												  state->rowsHint,
-												  state->sortKeys))
-				state->aborted = true;
+			state->abbrevNext *= 2;
+			if (state->sortKeys->abbrev_abort(state->memtupcount,
+											  state->abbrevRowsHint,
+											  state->sortKeys))
+				state->abbrevAborted = true;
 		}
 	}
 }
@@ -3096,11 +3096,11 @@ reversedirection_heap(Tuplesortstate *state)
 		sortKey->ssup_nulls_first = !sortKey->ssup_nulls_first;
 	}
 
-	if (state->sortKeys->tiebreak)
+	if (state->sortKeys->abbrev_tiebreak)
 	{
-		sortKey = state->sortKeys->tiebreak;
+		sortKey = state->sortKeys->abbrev_tiebreak;
 
-		Assert(sortKey->position == sortKeyTiebreak);
+		Assert(sortKey->abbreviate_state == ABBREVIATED_KEYS_TIE);
 		sortKey->ssup_reverse = !sortKey->ssup_reverse;
 		sortKey->ssup_nulls_first = !sortKey->ssup_nulls_first;
 	}
diff --git a/src/include/lib/hyperloglog.h b/src/include/lib/hyperloglog.h
index 8a1e15f..a6cbffc 100644
--- a/src/include/lib/hyperloglog.h
+++ b/src/include/lib/hyperloglog.h
@@ -5,7 +5,7 @@
  *
  * Portions Copyright (c) 2014, PostgreSQL Global Development Group
  *
- * Based on Hideaki Ohno's C++ implementation.  The copyright term's of Ohno's
+ * Based on Hideaki Ohno's C++ implementation.  The copyright terms of Ohno's
  * original version (the MIT license) follow.
  *
  * src/include/lib/hyperloglog.h
diff --git a/src/include/utils/sortsupport.h b/src/include/utils/sortsupport.h
index e9781cb..7b84e0a 100644
--- a/src/include/utils/sortsupport.h
+++ b/src/include/utils/sortsupport.h
@@ -55,10 +55,10 @@
 
 typedef enum
 {
-	sortKeyOther,		/* Second/subsequent key, or no abbreviation capability */
-	sortKeyAbbreviated,	/* Leading (abbreviated applicable) key (when available) */
-	sortKeyTiebreak,	/* "True" leading key, abbreviation tie-breaker */
-} SortKeyPosition;
+	ABBREVIATED_KEYS_NO = 0,	/* Second/subsequent key, or no abbreviation capability */
+	ABBREVIATED_KEYS_YES ,		/* Leading (abbreviated applicable) key (when available) */
+	ABBREVIATED_KEYS_TIE,		/* "True" leading key, abbreviation tie-breaker */
+} SortKeyAbbreviate;
 
 typedef struct SortSupportData *SortSupport;
 
@@ -142,38 +142,38 @@ typedef struct SortSupportData
 	 */
 
 	/*
-	 * Sort key "position" mostly just relates to whether or not the
+	 * Sort key "abbreviateState" mostly just relates to whether or not the
 	 * abbreviated key optimization is applicable in principle (that is, the
 	 * sortsupport routine needs to know if its dealing with a leading key).
 	 * Even with a leading key, internal sortsupport clients like tuplesort may
-	 * represent it as sortKeyOther because it isn't feasible to inject the
-	 * conversion routine.  However, sortKeyTiebreak means that it's a "proper"
-	 * sortsupport state, originally generated by the sortsupport routine
-	 * itself - the core system will never directly create a sort support state
-	 * with tie-break position.  There is very little distinction between
-	 * sortKeyTiebreak  and sortKeyOther positions, though.  The distinction
+	 * pass ABBREVIATED_KEYS_NO because it isn't feasible to inject the
+	 * conversion routine.  However, ABBREVIATED_KEYS_TIE  means that it's a
+	 * "proper" sortsupport state, originally generated by the sortsupport
+	 * routine itself -- the core system will never directly create a tie-break
+	 * sort support state.  There is very little distinction between
+	 * ABBREVIATED_KEYS_NO and ABBREVIATED_KEYS_TIE, though.  The distinction
 	 * only exists to allow sortsupport routines to squeeze a bit more
 	 * performance from the knowledge that an authoritative tie-breaker
 	 * comparison is required because a prior alternative comparison didn't
 	 * work out (as opposed to being called without there ever being an
 	 * abbreviated comparison of the tuple attribute).
 	 *
-	 * A sortsupport routine may initially decide against applying the
-	 * abbreviation optimization by setting a passed sortKeyAbbreviated sort
-	 * support state's position to sortKeyOther.  This is typically used for
+	 * A sortsupport routine may itself initially decide against applying the
+	 * abbreviation optimization by setting a passed sort support state's
+	 * abbreviated state to ABBREVIATED_KEYS_NO.  This is typically used for
 	 * platform-specific special cases where the optimization is thought to be
 	 * ineffective.
 	 */
-	SortKeyPosition		position;
+	SortKeyAbbreviate		abbrev_state;
 
 	/*
 	 * Converter to abbreviated format, from original representation.  Core
 	 * code uses this callback to convert from a pass-by-reference "original"
 	 * Datum to a pass-by-value abbreviated key Datum.  Note that original is
-	 * guaranteed not null because it doesn't make sense to factor NULL values
+	 * guaranteed NOT NULL, because it doesn't make sense to factor NULLness
 	 * into ad-hoc cost model.
 	 */
-	Datum		(*converter) (Datum original, SortSupport ssup);
+	Datum		(*abbrev_converter) (Datum original, SortSupport ssup);
 
 	/*
 	 * This callback allows clients to verify that the current strategy is
@@ -186,8 +186,8 @@ typedef struct SortSupportData
 	 * available during the course of conversion. (By convention, negative
 	 * rowhint values are interpreted as "no hint available".)
 	 */
-	bool		(*abort_conversion) (int memtupcount, double rowhint,
-									 SortSupport ssup);
+	bool		(*abbrev_abort) (int memtupcount, double rowhint,
+								 SortSupport ssup);
 
 	/*
 	 * Alternative tiebreak SortSupport state for leading (abbreviated) key,
@@ -199,7 +199,7 @@ typedef struct SortSupportData
 	 * It is only ever initialized by a SortSupport routine with abbreviation
 	 * support, and not any internal code.
 	 */
-	SortSupport			tiebreak;
+	SortSupport			abbrev_tiebreak;
 } SortSupportData;
 
 
-- 
1.9.1

