summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas2021-04-07 11:33:21 +0000
committerHeikki Linnakangas2021-04-07 11:33:21 +0000
commitd92b1cdbab408d8f1299257125c9ae375f3ca644 (patch)
treee75e26cae720ad2f4a0e1d8ef071ae197924c45a
parent9f984ba6d23dc6eecebf479ab1d3f2e550a4e9be (diff)
Revert "Add sortsupport for gist_btree opclasses, for faster index builds."
This reverts commit 9f984ba6d23dc6eecebf479ab1d3f2e550a4e9be. It was making the buildfarm unhappy, apparently setting client_min_messages in a regression test produces different output if log_statement='all'. Another issue is that I now suspect the bit sortsupport function was in fact not correct to call byteacmp(). Revert to investigate both of those issues.
-rw-r--r--contrib/btree_gist/Makefile2
-rw-r--r--contrib/btree_gist/btree_bit.c25
-rw-r--r--contrib/btree_gist/btree_bytea.c26
-rw-r--r--contrib/btree_gist/btree_cash.c80
-rw-r--r--contrib/btree_gist/btree_date.c27
-rw-r--r--contrib/btree_gist/btree_enum.c70
-rw-r--r--contrib/btree_gist/btree_float4.c71
-rw-r--r--contrib/btree_gist/btree_float8.c77
-rw-r--r--contrib/btree_gist/btree_gist--1.6--1.7.sql182
-rw-r--r--contrib/btree_gist/btree_gist.control2
-rw-r--r--contrib/btree_gist/btree_gist.h1
-rw-r--r--contrib/btree_gist/btree_inet.c77
-rw-r--r--contrib/btree_gist/btree_int2.c70
-rw-r--r--contrib/btree_gist/btree_int4.c70
-rw-r--r--contrib/btree_gist/btree_int8.c80
-rw-r--r--contrib/btree_gist/btree_interval.c27
-rw-r--r--contrib/btree_gist/btree_macaddr.c78
-rw-r--r--contrib/btree_gist/btree_macaddr8.c78
-rw-r--r--contrib/btree_gist/btree_numeric.c29
-rw-r--r--contrib/btree_gist/btree_oid.c70
-rw-r--r--contrib/btree_gist/btree_text.c25
-rw-r--r--contrib/btree_gist/btree_time.c27
-rw-r--r--contrib/btree_gist/btree_ts.c27
-rw-r--r--contrib/btree_gist/btree_uuid.c25
-rw-r--r--contrib/btree_gist/expected/bit.out7
-rw-r--r--contrib/btree_gist/expected/bytea.out7
-rw-r--r--contrib/btree_gist/expected/cash.out7
-rw-r--r--contrib/btree_gist/expected/char.out7
-rw-r--r--contrib/btree_gist/expected/cidr.out7
-rw-r--r--contrib/btree_gist/expected/date.out7
-rw-r--r--contrib/btree_gist/expected/enum.out7
-rw-r--r--contrib/btree_gist/expected/float4.out7
-rw-r--r--contrib/btree_gist/expected/float8.out7
-rw-r--r--contrib/btree_gist/expected/inet.out7
-rw-r--r--contrib/btree_gist/expected/int2.out7
-rw-r--r--contrib/btree_gist/expected/int4.out7
-rw-r--r--contrib/btree_gist/expected/int8.out7
-rw-r--r--contrib/btree_gist/expected/interval.out7
-rw-r--r--contrib/btree_gist/expected/macaddr.out7
-rw-r--r--contrib/btree_gist/expected/macaddr8.out7
-rw-r--r--contrib/btree_gist/expected/numeric.out7
-rw-r--r--contrib/btree_gist/expected/oid.out7
-rw-r--r--contrib/btree_gist/expected/text.out7
-rw-r--r--contrib/btree_gist/expected/time.out7
-rw-r--r--contrib/btree_gist/expected/timestamp.out7
-rw-r--r--contrib/btree_gist/expected/timestamptz.out7
-rw-r--r--contrib/btree_gist/expected/timetz.out7
-rw-r--r--contrib/btree_gist/expected/uuid.out7
-rw-r--r--contrib/btree_gist/expected/varbit.out7
-rw-r--r--contrib/btree_gist/expected/varchar.out7
-rw-r--r--contrib/btree_gist/sql/bit.sql4
-rw-r--r--contrib/btree_gist/sql/bytea.sql4
-rw-r--r--contrib/btree_gist/sql/cash.sql4
-rw-r--r--contrib/btree_gist/sql/char.sql4
-rw-r--r--contrib/btree_gist/sql/cidr.sql4
-rw-r--r--contrib/btree_gist/sql/date.sql4
-rw-r--r--contrib/btree_gist/sql/enum.sql4
-rw-r--r--contrib/btree_gist/sql/float4.sql4
-rw-r--r--contrib/btree_gist/sql/float8.sql4
-rw-r--r--contrib/btree_gist/sql/inet.sql4
-rw-r--r--contrib/btree_gist/sql/int2.sql4
-rw-r--r--contrib/btree_gist/sql/int4.sql4
-rw-r--r--contrib/btree_gist/sql/int8.sql4
-rw-r--r--contrib/btree_gist/sql/interval.sql4
-rw-r--r--contrib/btree_gist/sql/macaddr.sql4
-rw-r--r--contrib/btree_gist/sql/macaddr8.sql4
-rw-r--r--contrib/btree_gist/sql/numeric.sql4
-rw-r--r--contrib/btree_gist/sql/oid.sql4
-rw-r--r--contrib/btree_gist/sql/text.sql4
-rw-r--r--contrib/btree_gist/sql/time.sql4
-rw-r--r--contrib/btree_gist/sql/timestamp.sql4
-rw-r--r--contrib/btree_gist/sql/timestamptz.sql4
-rw-r--r--contrib/btree_gist/sql/timetz.sql4
-rw-r--r--contrib/btree_gist/sql/uuid.sql4
-rw-r--r--contrib/btree_gist/sql/varbit.sql4
-rw-r--r--contrib/btree_gist/sql/varchar.sql4
-rw-r--r--src/backend/access/gist/gistbuild.c1
77 files changed, 3 insertions, 1530 deletions
diff --git a/contrib/btree_gist/Makefile b/contrib/btree_gist/Makefile
index a1f818f71e6..e92d974a1a3 100644
--- a/contrib/btree_gist/Makefile
+++ b/contrib/btree_gist/Makefile
@@ -32,7 +32,7 @@ EXTENSION = btree_gist
DATA = btree_gist--1.0--1.1.sql \
btree_gist--1.1--1.2.sql btree_gist--1.2.sql btree_gist--1.2--1.3.sql \
btree_gist--1.3--1.4.sql btree_gist--1.4--1.5.sql \
- btree_gist--1.5--1.6.sql btree_gist--1.6--1.7.sql
+ btree_gist--1.5--1.6.sql
PGFILEDESC = "btree_gist - B-tree equivalent GiST operator classes"
REGRESS = init int2 int4 int8 float4 float8 cash oid timestamp timestamptz \
diff --git a/contrib/btree_gist/btree_bit.c b/contrib/btree_gist/btree_bit.c
index 61b2eecfd59..2225244ded5 100644
--- a/contrib/btree_gist/btree_bit.c
+++ b/contrib/btree_gist/btree_bit.c
@@ -19,7 +19,6 @@ PG_FUNCTION_INFO_V1(gbt_bit_picksplit);
PG_FUNCTION_INFO_V1(gbt_bit_consistent);
PG_FUNCTION_INFO_V1(gbt_bit_penalty);
PG_FUNCTION_INFO_V1(gbt_bit_same);
-PG_FUNCTION_INFO_V1(gbt_bit_sortsupport);
/* define for comparison */
@@ -210,27 +209,3 @@ gbt_bit_penalty(PG_FUNCTION_ARGS)
PG_RETURN_POINTER(gbt_var_penalty(result, o, n, PG_GET_COLLATION(),
&tinfo, fcinfo->flinfo));
}
-
-static int
-gbt_bit_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- /* Use byteacmp(), like gbt_bitcmp() does */
- return DatumGetInt32(DirectFunctionCall2(byteacmp,
- PointerGetDatum(a),
- PointerGetDatum(b)));
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_bit_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- ssup->comparator = gbt_bit_sort_build_cmp;
- ssup->abbrev_converter = NULL;
- ssup->abbrev_abort = NULL;
- ssup->abbrev_full_comparator = NULL;
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_bytea.c b/contrib/btree_gist/btree_bytea.c
index a2abfb7d7c2..6b005f0157e 100644
--- a/contrib/btree_gist/btree_bytea.c
+++ b/contrib/btree_gist/btree_bytea.c
@@ -18,7 +18,6 @@ PG_FUNCTION_INFO_V1(gbt_bytea_picksplit);
PG_FUNCTION_INFO_V1(gbt_bytea_consistent);
PG_FUNCTION_INFO_V1(gbt_bytea_penalty);
PG_FUNCTION_INFO_V1(gbt_bytea_same);
-PG_FUNCTION_INFO_V1(gbt_bytea_sortsupport);
/* define for comparison */
@@ -88,7 +87,7 @@ static const gbtree_vinfo tinfo =
/**************************************************
- * Bytea ops
+ * Text ops
**************************************************/
@@ -169,26 +168,3 @@ gbt_bytea_penalty(PG_FUNCTION_ARGS)
PG_RETURN_POINTER(gbt_var_penalty(result, o, n, PG_GET_COLLATION(),
&tinfo, fcinfo->flinfo));
}
-
-static int
-gbt_bytea_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- return DatumGetInt32(DirectFunctionCall2(byteacmp,
- PointerGetDatum(a),
- PointerGetDatum(b)));
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_bytea_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- ssup->comparator = gbt_bytea_sort_build_cmp;
- ssup->abbrev_converter = NULL;
- ssup->abbrev_abort = NULL;
- ssup->abbrev_full_comparator = NULL;
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_cash.c b/contrib/btree_gist/btree_cash.c
index dbd72d3ea08..dfa23224b6f 100644
--- a/contrib/btree_gist/btree_cash.c
+++ b/contrib/btree_gist/btree_cash.c
@@ -25,7 +25,6 @@ PG_FUNCTION_INFO_V1(gbt_cash_consistent);
PG_FUNCTION_INFO_V1(gbt_cash_distance);
PG_FUNCTION_INFO_V1(gbt_cash_penalty);
PG_FUNCTION_INFO_V1(gbt_cash_same);
-PG_FUNCTION_INFO_V1(gbt_cash_sortsupport);
static bool
gbt_cashgt(const void *a, const void *b, FmgrInfo *flinfo)
@@ -217,82 +216,3 @@ gbt_cash_same(PG_FUNCTION_ARGS)
*result = gbt_num_same((void *) b1, (void *) b2, &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
-
-static int
-gbt_cash_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- cashKEY *ia = (cashKEY *) DatumGetPointer(a);
- cashKEY *ib = (cashKEY *) DatumGetPointer(b);
-
- /* for leaf items we expect lower == upper */
- Assert(ia->lower == ia->upper);
- Assert(ib->lower == ib->upper);
-
- if (ia->lower == ib->lower)
- return 0;
-
- return (ia->lower > ib->lower) ? 1 : -1;
-}
-
-static Datum
-gbt_cash_abbrev_convert(Datum original, SortSupport ssup)
-{
- cashKEY *b1 = (cashKEY *) DatumGetPointer(original);
- int64 z = b1->lower;
-
-#if SIZEOF_DATUM == 8
- return Int64GetDatum(z);
-#else
- return Int32GetDatum(z >> 32);
-#endif
-}
-
-static int
-gbt_cash_cmp_abbrev(Datum z1, Datum z2, SortSupport ssup)
-{
-#if SIZEOF_DATUM == 8
- int64 a = DatumGetInt64(z1);
- int64 b = DatumGetInt64(z2);
-#else
- int32 a = DatumGetInt32(z1);
- int32 b = DatumGetInt32(z2);
-#endif
-
- if (a > b)
- return 1;
- else if (a < b)
- return -1;
- else
- return 0;
-}
-
-/*
- * We never consider aborting the abbreviation.
- */
-static bool
-gbt_cash_abbrev_abort(int memtupcount, SortSupport ssup)
-{
- return false;
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_cash_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- if (ssup->abbreviate)
- {
- ssup->comparator = gbt_cash_cmp_abbrev;
- ssup->abbrev_converter = gbt_cash_abbrev_convert;
- ssup->abbrev_abort = gbt_cash_abbrev_abort;
- ssup->abbrev_full_comparator = gbt_cash_sort_build_cmp;
- }
- else
- {
- ssup->comparator = gbt_cash_sort_build_cmp;
- }
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_date.c b/contrib/btree_gist/btree_date.c
index 3abb6e9c475..455a265a497 100644
--- a/contrib/btree_gist/btree_date.c
+++ b/contrib/btree_gist/btree_date.c
@@ -25,7 +25,6 @@ PG_FUNCTION_INFO_V1(gbt_date_consistent);
PG_FUNCTION_INFO_V1(gbt_date_distance);
PG_FUNCTION_INFO_V1(gbt_date_penalty);
PG_FUNCTION_INFO_V1(gbt_date_same);
-PG_FUNCTION_INFO_V1(gbt_date_sortsupport);
static bool
gbt_dategt(const void *a, const void *b, FmgrInfo *flinfo)
@@ -258,29 +257,3 @@ gbt_date_same(PG_FUNCTION_ARGS)
*result = gbt_num_same((void *) b1, (void *) b2, &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
-
-static int
-gbt_date_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- dateKEY *ia = (dateKEY *) PointerGetDatum(a);
- dateKEY *ib = (dateKEY *) PointerGetDatum(b);
-
- return DatumGetInt32(DirectFunctionCall2(date_cmp,
- DateADTGetDatum(ia->lower),
- DateADTGetDatum(ib->lower)));
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_date_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- ssup->comparator = gbt_date_sort_build_cmp;
- ssup->abbrev_converter = NULL;
- ssup->abbrev_abort = NULL;
- ssup->abbrev_full_comparator = NULL;
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_enum.c b/contrib/btree_gist/btree_enum.c
index e8c5bc5ffe1..d4dc38a38e5 100644
--- a/contrib/btree_gist/btree_enum.c
+++ b/contrib/btree_gist/btree_enum.c
@@ -26,7 +26,6 @@ PG_FUNCTION_INFO_V1(gbt_enum_picksplit);
PG_FUNCTION_INFO_V1(gbt_enum_consistent);
PG_FUNCTION_INFO_V1(gbt_enum_penalty);
PG_FUNCTION_INFO_V1(gbt_enum_same);
-PG_FUNCTION_INFO_V1(gbt_enum_sortsupport);
static bool
@@ -184,72 +183,3 @@ gbt_enum_same(PG_FUNCTION_ARGS)
*result = gbt_num_same((void *) b1, (void *) b2, &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
-
-static int
-gbt_enum_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- oidKEY *ia = (oidKEY *) DatumGetPointer(a);
- oidKEY *ib = (oidKEY *) DatumGetPointer(b);
-
- /* for leaf items we expect lower == upper */
- Assert(ia->lower == ia->upper);
- Assert(ib->lower == ib->upper);
-
- if (ia->lower == ib->lower)
- return 0;
-
- return (ia->lower > ib->lower) ? 1 : -1;
-}
-
-static Datum
-gbt_enum_abbrev_convert(Datum original, SortSupport ssup)
-{
- oidKEY *b1 = (oidKEY *) DatumGetPointer(original);
-
- return ObjectIdGetDatum(b1->lower);
-}
-
-static int
-gbt_enum_cmp_abbrev(Datum z1, Datum z2, SortSupport ssup)
-{
- Oid a = DatumGetObjectId(z1);
- Oid b = DatumGetObjectId(z2);
-
- if (a > b)
- return 1;
- else if (a < b)
- return -1;
- else
- return 0;
-}
-
-/*
- * We never consider aborting the abbreviation.
- */
-static bool
-gbt_enum_abbrev_abort(int memtupcount, SortSupport ssup)
-{
- return false;
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_enum_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- if (ssup->abbreviate)
- {
- ssup->comparator = gbt_enum_cmp_abbrev;
- ssup->abbrev_converter = gbt_enum_abbrev_convert;
- ssup->abbrev_abort = gbt_enum_abbrev_abort;
- ssup->abbrev_full_comparator = gbt_enum_sort_build_cmp;
- }
- else
- {
- ssup->comparator = gbt_enum_sort_build_cmp;
- }
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_float4.c b/contrib/btree_gist/btree_float4.c
index 016b2d3d68f..3604c73313a 100644
--- a/contrib/btree_gist/btree_float4.c
+++ b/contrib/btree_gist/btree_float4.c
@@ -23,7 +23,6 @@ PG_FUNCTION_INFO_V1(gbt_float4_consistent);
PG_FUNCTION_INFO_V1(gbt_float4_distance);
PG_FUNCTION_INFO_V1(gbt_float4_penalty);
PG_FUNCTION_INFO_V1(gbt_float4_same);
-PG_FUNCTION_INFO_V1(gbt_float4_sortsupport);
static bool
gbt_float4gt(const void *a, const void *b, FmgrInfo *flinfo)
@@ -210,73 +209,3 @@ gbt_float4_same(PG_FUNCTION_ARGS)
*result = gbt_num_same((void *) b1, (void *) b2, &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
-
-
-static int
-gbt_float4_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- float4KEY *ia = (float4KEY *) DatumGetPointer(a);
- float4KEY *ib = (float4KEY *) DatumGetPointer(b);
-
- /* for leaf items we expect lower == upper */
- Assert(ia->lower == ia->upper);
- Assert(ib->lower == ib->upper);
-
- if (ia->lower == ib->lower)
- return 0;
-
- return (ia->lower > ib->lower) ? 1 : -1;
-}
-
-static Datum
-gbt_float4_abbrev_convert(Datum original, SortSupport ssup)
-{
- float4KEY *b1 = (float4KEY *) DatumGetPointer(original);
-
- return Float4GetDatum(b1->lower);
-}
-
-static int
-gbt_float4_cmp_abbrev(Datum z1, Datum z2, SortSupport ssup)
-{
- float4 a = DatumGetFloat4(z1);
- float4 b = DatumGetFloat4(z2);
-
- if (a > b)
- return 1;
- else if (a < b)
- return -1;
- else
- return 0;
-}
-
-/*
- * We never consider aborting the abbreviation.
- */
-static bool
-gbt_float4_abbrev_abort(int memtupcount, SortSupport ssup)
-{
- return false;
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_float4_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- if (ssup->abbreviate)
- {
- ssup->comparator = gbt_float4_cmp_abbrev;
- ssup->abbrev_converter = gbt_float4_abbrev_convert;
- ssup->abbrev_abort = gbt_float4_abbrev_abort;
- ssup->abbrev_full_comparator = gbt_float4_sort_build_cmp;
- }
- else
- {
- ssup->comparator = gbt_float4_sort_build_cmp;
- }
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_float8.c b/contrib/btree_gist/btree_float8.c
index bee1e4e05e2..10a5262aaa7 100644
--- a/contrib/btree_gist/btree_float8.c
+++ b/contrib/btree_gist/btree_float8.c
@@ -23,7 +23,6 @@ PG_FUNCTION_INFO_V1(gbt_float8_consistent);
PG_FUNCTION_INFO_V1(gbt_float8_distance);
PG_FUNCTION_INFO_V1(gbt_float8_penalty);
PG_FUNCTION_INFO_V1(gbt_float8_same);
-PG_FUNCTION_INFO_V1(gbt_float8_sortsupport);
static bool
@@ -217,79 +216,3 @@ gbt_float8_same(PG_FUNCTION_ARGS)
*result = gbt_num_same((void *) b1, (void *) b2, &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
-
-static int
-gbt_float8_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- float8KEY *ia = (float8KEY *) DatumGetPointer(a);
- float8KEY *ib = (float8KEY *) DatumGetPointer(b);
-
- /* for leaf items we expect lower == upper */
- Assert(ia->lower == ia->upper);
- Assert(ib->lower == ib->upper);
-
- if (ia->lower == ib->lower)
- return 0;
-
- return (ia->lower > ib->lower) ? 1 : -1;
-}
-
-static Datum
-gbt_float8_abbrev_convert(Datum original, SortSupport ssup)
-{
- float8KEY *b1 = (float8KEY *) DatumGetPointer(original);
- float8 z = b1->lower;
-
-#if SIZEOF_DATUM == 8
- return Float8GetDatum(z);
-#else
- return Float4GetDatum((float4) z);
-#endif
-}
-
-static int
-gbt_float8_cmp_abbrev(Datum z1, Datum z2, SortSupport ssup)
-{
-#if SIZEOF_DATUM == 8
- float8 a = DatumGetFloat8(z1);
- float8 b = DatumGetFloat8(z2);
-#else
- float4 a = DatumGetFloat4(z1);
- float4 b = DatumGetFloat4(z2);
-#endif
-
- if (a > b)
- return 1;
- else if (a < b)
- return -1;
- else
- return 0;
-}
-
-static bool
-gbt_float8_abbrev_abort(int memtupcount, SortSupport ssup)
-{
- return false;
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_float8_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- if (ssup->abbreviate)
- {
- ssup->comparator = gbt_float8_cmp_abbrev;
- ssup->abbrev_converter = gbt_float8_abbrev_convert;
- ssup->abbrev_abort = gbt_float8_abbrev_abort;
- ssup->abbrev_full_comparator = gbt_float8_sort_build_cmp;
- }
- else
- {
- ssup->comparator = gbt_float8_sort_build_cmp;
- }
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_gist--1.6--1.7.sql b/contrib/btree_gist/btree_gist--1.6--1.7.sql
deleted file mode 100644
index abb5b8b0f43..00000000000
--- a/contrib/btree_gist/btree_gist--1.6--1.7.sql
+++ /dev/null
@@ -1,182 +0,0 @@
-/* contrib/btree_gist/btree_gist--1.6--1.7.sql */
-
--- complain if script is sourced in psql, rather than via CREATE EXTENSION
-\echo Use "ALTER EXTENSION btree_gist UPDATE TO '1.7'" to load this file. \quit
-
-
-CREATE FUNCTION gbt_int8_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_int8_ops USING gist ADD
- FUNCTION 11 (int8, int8) gbt_int8_sortsupport (internal) ;
-
-CREATE FUNCTION gbt_int4_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_int4_ops USING gist ADD
- FUNCTION 11 (int4, int4) gbt_int4_sortsupport (internal) ;
-
-CREATE FUNCTION gbt_int2_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_int2_ops USING gist ADD
- FUNCTION 11 (int2, int2) gbt_int2_sortsupport (internal) ;
-
-CREATE FUNCTION gbt_float8_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_float8_ops USING gist ADD
- FUNCTION 11 (float8, float8) gbt_float8_sortsupport (internal) ;
-
-CREATE FUNCTION gbt_float4_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_float4_ops USING gist ADD
- FUNCTION 11 (float4, float4) gbt_float4_sortsupport (internal) ;
-
-CREATE FUNCTION gbt_enum_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_enum_ops USING gist ADD
- FUNCTION 11 (anyenum, anyenum) gbt_enum_sortsupport (internal) ;
-
-CREATE FUNCTION gbt_oid_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_oid_ops USING gist ADD
- FUNCTION 11 (oid, oid) gbt_oid_sortsupport (internal) ;
-
-CREATE FUNCTION gbt_cash_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_cash_ops USING gist ADD
- FUNCTION 11 (money, money) gbt_cash_sortsupport (internal) ;
-
-CREATE FUNCTION gbt_inet_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_inet_ops USING gist ADD
- FUNCTION 11 (inet, inet) gbt_inet_sortsupport (internal) ;
-
-ALTER OPERATOR FAMILY gist_cidr_ops USING gist ADD
- FUNCTION 11 (cidr, cidr) gbt_inet_sortsupport (internal) ;
-
-
-CREATE FUNCTION gbt_macad_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_macaddr_ops USING gist ADD
- FUNCTION 11 (macaddr, macaddr) gbt_macad_sortsupport (internal) ;
-
-CREATE FUNCTION gbt_macad8_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_macaddr8_ops USING gist ADD
- FUNCTION 11 (macaddr8, macaddr8) gbt_macad8_sortsupport (internal) ;
-
-CREATE FUNCTION gbt_numeric_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_numeric_ops USING gist ADD
- FUNCTION 11 (numeric, numeric) gbt_numeric_sortsupport (internal) ;
-
-CREATE FUNCTION gbt_uuid_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_uuid_ops USING gist ADD
- FUNCTION 11 (uuid, uuid) gbt_uuid_sortsupport (internal) ;
-
-CREATE FUNCTION gbt_ts_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_timestamp_ops USING gist ADD
- FUNCTION 11 (timestamp, timestamp) gbt_ts_sortsupport (internal) ;
-
-ALTER OPERATOR FAMILY gist_timestamptz_ops USING gist ADD
- FUNCTION 11 (timestamptz, timestamptz) gbt_ts_sortsupport (internal) ;
-
-CREATE FUNCTION gbt_text_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_text_ops USING gist ADD
- FUNCTION 11 (text, text) gbt_text_sortsupport (internal) ;
-
-ALTER OPERATOR FAMILY gist_bpchar_ops USING gist ADD
- FUNCTION 11 (bpchar, bpchar) gbt_text_sortsupport (internal) ;
-
-CREATE FUNCTION gbt_time_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_time_ops USING gist ADD
- FUNCTION 11 (time, time) gbt_time_sortsupport (internal) ;
-
-ALTER OPERATOR FAMILY gist_timetz_ops USING gist ADD
- FUNCTION 11 (timetz, timetz) gbt_time_sortsupport (internal) ;
-
-CREATE FUNCTION gbt_bytea_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_bytea_ops USING gist ADD
- FUNCTION 11 (bytea, bytea) gbt_bytea_sortsupport (internal) ;
-
-CREATE FUNCTION gbt_date_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_date_ops USING gist ADD
- FUNCTION 11 (date, date) gbt_date_sortsupport (internal) ;
-
-CREATE FUNCTION gbt_bit_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_bit_ops USING gist ADD
- FUNCTION 11 (bit, bit) gbt_bit_sortsupport (internal) ;
-
-ALTER OPERATOR FAMILY gist_vbit_ops USING gist ADD
- FUNCTION 11 (varbit, varbit) gbt_bit_sortsupport (internal) ;
-
-CREATE FUNCTION gbt_intv_sortsupport(internal)
-RETURNS void
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-ALTER OPERATOR FAMILY gist_interval_ops USING gist ADD
- FUNCTION 11 (interval, interval) gbt_intv_sortsupport (internal) ;
-
diff --git a/contrib/btree_gist/btree_gist.control b/contrib/btree_gist/btree_gist.control
index fa9171a80a2..e5c41fe8f39 100644
--- a/contrib/btree_gist/btree_gist.control
+++ b/contrib/btree_gist/btree_gist.control
@@ -1,6 +1,6 @@
# btree_gist extension
comment = 'support for indexing common datatypes in GiST'
-default_version = '1.7'
+default_version = '1.6'
module_pathname = '$libdir/btree_gist'
relocatable = true
trusted = true
diff --git a/contrib/btree_gist/btree_gist.h b/contrib/btree_gist/btree_gist.h
index 35ad287ed3d..14c7c8ee193 100644
--- a/contrib/btree_gist/btree_gist.h
+++ b/contrib/btree_gist/btree_gist.h
@@ -6,7 +6,6 @@
#include "access/nbtree.h"
#include "fmgr.h"
-#include "utils/sortsupport.h"
#define BtreeGistNotEqualStrategyNumber 6
diff --git a/contrib/btree_gist/btree_inet.c b/contrib/btree_gist/btree_inet.c
index 88136128cee..e4b3a946b27 100644
--- a/contrib/btree_gist/btree_inet.c
+++ b/contrib/btree_gist/btree_inet.c
@@ -24,7 +24,6 @@ PG_FUNCTION_INFO_V1(gbt_inet_picksplit);
PG_FUNCTION_INFO_V1(gbt_inet_consistent);
PG_FUNCTION_INFO_V1(gbt_inet_penalty);
PG_FUNCTION_INFO_V1(gbt_inet_same);
-PG_FUNCTION_INFO_V1(gbt_inet_sortsupport);
static bool
@@ -187,79 +186,3 @@ gbt_inet_same(PG_FUNCTION_ARGS)
*result = gbt_num_same((void *) b1, (void *) b2, &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
-
-static int
-gbt_inet_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- inetKEY *ia = (inetKEY *) DatumGetPointer(a);
- inetKEY *ib = (inetKEY *) DatumGetPointer(b);
-
- /* for leaf items we expect lower == upper */
- Assert(ia->lower == ia->upper);
- Assert(ib->lower == ib->upper);
-
- if (ia->lower == ib->lower)
- return 0;
-
- return (ia->lower > ib->lower) ? 1 : -1;
-}
-
-static Datum
-gbt_inet_abbrev_convert(Datum original, SortSupport ssup)
-{
- inetKEY *b1 = (inetKEY *) DatumGetPointer(original);
- double z = b1->lower;
-
-#if SIZEOF_DATUM == 8
- return Float8GetDatum(z);
-#else
- return Float4GetDatum((float4) z);
-#endif
-}
-
-static int
-gbt_inet_cmp_abbrev(Datum z1, Datum z2, SortSupport ssup)
-{
-#if SIZEOF_DATUM == 8
- float8 a = DatumGetFloat8(z1);
- float8 b = DatumGetFloat8(z2);
-#else
- float4 a = DatumGetFloat4(z1);
- float4 b = DatumGetFloat4(z2);
-#endif
-
- if (a > b)
- return 1;
- else if (a < b)
- return -1;
- else
- return 0;
-}
-
-static bool
-gbt_inet_abbrev_abort(int memtupcount, SortSupport ssup)
-{
- return false;
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_inet_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- if (ssup->abbreviate)
- {
- ssup->comparator = gbt_inet_cmp_abbrev;
- ssup->abbrev_converter = gbt_inet_abbrev_convert;
- ssup->abbrev_abort = gbt_inet_abbrev_abort;
- ssup->abbrev_full_comparator = gbt_inet_sort_build_cmp;
- }
- else
- {
- ssup->comparator = gbt_inet_sort_build_cmp;
- }
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_int2.c b/contrib/btree_gist/btree_int2.c
index 38ca3e05da7..a91b95ff398 100644
--- a/contrib/btree_gist/btree_int2.c
+++ b/contrib/btree_gist/btree_int2.c
@@ -24,7 +24,6 @@ PG_FUNCTION_INFO_V1(gbt_int2_consistent);
PG_FUNCTION_INFO_V1(gbt_int2_distance);
PG_FUNCTION_INFO_V1(gbt_int2_penalty);
PG_FUNCTION_INFO_V1(gbt_int2_same);
-PG_FUNCTION_INFO_V1(gbt_int2_sortsupport);
static bool
gbt_int2gt(const void *a, const void *b, FmgrInfo *flinfo)
@@ -215,72 +214,3 @@ gbt_int2_same(PG_FUNCTION_ARGS)
*result = gbt_num_same((void *) b1, (void *) b2, &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
-
-static int
-gbt_int2_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- int16KEY *ia = (int16KEY *) DatumGetPointer(a);
- int16KEY *ib = (int16KEY *) DatumGetPointer(b);
-
- /* for leaf items we expect lower == upper */
- Assert(ia->lower == ia->upper);
- Assert(ib->lower == ib->upper);
-
- if (ia->lower == ib->lower)
- return 0;
-
- return (ia->lower > ib->lower) ? 1 : -1;
-}
-
-static Datum
-gbt_int2_abbrev_convert(Datum original, SortSupport ssup)
-{
- int16KEY *b1 = (int16KEY *) DatumGetPointer(original);
-
- return Int16GetDatum(b1->lower);
-}
-
-static int
-gbt_int2_cmp_abbrev(Datum z1, Datum z2, SortSupport ssup)
-{
- int16 a = DatumGetInt16(z1);
- int16 b = DatumGetInt16(z2);
-
- if (a > b)
- return 1;
- else if (a < b)
- return -1;
- else
- return 0;
-}
-
-/*
- * We never consider aborting the abbreviation.
- */
-static bool
-gbt_int2_abbrev_abort(int memtupcount, SortSupport ssup)
-{
- return false;
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_int2_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- if (ssup->abbreviate)
- {
- ssup->comparator = gbt_int2_cmp_abbrev;
- ssup->abbrev_converter = gbt_int2_abbrev_convert;
- ssup->abbrev_abort = gbt_int2_abbrev_abort;
- ssup->abbrev_full_comparator = gbt_int2_sort_build_cmp;
- }
- else
- {
- ssup->comparator = gbt_int2_sort_build_cmp;
- }
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_int4.c b/contrib/btree_gist/btree_int4.c
index 21bd01ed10d..7ea98c478c7 100644
--- a/contrib/btree_gist/btree_int4.c
+++ b/contrib/btree_gist/btree_int4.c
@@ -24,7 +24,6 @@ PG_FUNCTION_INFO_V1(gbt_int4_consistent);
PG_FUNCTION_INFO_V1(gbt_int4_distance);
PG_FUNCTION_INFO_V1(gbt_int4_penalty);
PG_FUNCTION_INFO_V1(gbt_int4_same);
-PG_FUNCTION_INFO_V1(gbt_int4_sortsupport);
static bool
@@ -216,72 +215,3 @@ gbt_int4_same(PG_FUNCTION_ARGS)
*result = gbt_num_same((void *) b1, (void *) b2, &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
-
-static int
-gbt_int4_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- int32KEY *ia = (int32KEY *) DatumGetPointer(a);
- int32KEY *ib = (int32KEY *) DatumGetPointer(b);
-
- /* for leaf items we expect lower == upper */
- Assert(ia->lower == ia->upper);
- Assert(ib->lower == ib->upper);
-
- if (ia->lower == ib->lower)
- return 0;
-
- return (ia->lower > ib->lower) ? 1 : -1;
-}
-
-static Datum
-gbt_int4_abbrev_convert(Datum original, SortSupport ssup)
-{
- int32KEY *b1 = (int32KEY *) DatumGetPointer(original);
-
- return Int32GetDatum(b1->lower);
-}
-
-static int
-gbt_int4_cmp_abbrev(Datum z1, Datum z2, SortSupport ssup)
-{
- int32 a = DatumGetInt32(z1);
- int32 b = DatumGetInt32(z2);
-
- if (a > b)
- return 1;
- else if (a < b)
- return -1;
- else
- return 0;
-}
-
-/*
- * We never consider aborting the abbreviation.
- */
-static bool
-gbt_int4_abbrev_abort(int memtupcount, SortSupport ssup)
-{
- return false;
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_int4_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- if (ssup->abbreviate)
- {
- ssup->comparator = gbt_int4_cmp_abbrev;
- ssup->abbrev_converter = gbt_int4_abbrev_convert;
- ssup->abbrev_abort = gbt_int4_abbrev_abort;
- ssup->abbrev_full_comparator = gbt_int4_sort_build_cmp;
- }
- else
- {
- ssup->comparator = gbt_int4_sort_build_cmp;
- }
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_int8.c b/contrib/btree_gist/btree_int8.c
index b6e7fe68742..df2b0d174b9 100644
--- a/contrib/btree_gist/btree_int8.c
+++ b/contrib/btree_gist/btree_int8.c
@@ -24,7 +24,6 @@ PG_FUNCTION_INFO_V1(gbt_int8_consistent);
PG_FUNCTION_INFO_V1(gbt_int8_distance);
PG_FUNCTION_INFO_V1(gbt_int8_penalty);
PG_FUNCTION_INFO_V1(gbt_int8_same);
-PG_FUNCTION_INFO_V1(gbt_int8_sortsupport);
static bool
@@ -216,82 +215,3 @@ gbt_int8_same(PG_FUNCTION_ARGS)
*result = gbt_num_same((void *) b1, (void *) b2, &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
-
-static int
-gbt_int8_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- int64KEY *ia = (int64KEY *) DatumGetPointer(a);
- int64KEY *ib = (int64KEY *) DatumGetPointer(b);
-
- /* for leaf items we expect lower == upper */
- Assert(ia->lower == ia->upper);
- Assert(ib->lower == ib->upper);
-
- if (ia->lower == ib->lower)
- return 0;
-
- return (ia->lower > ib->lower) ? 1 : -1;
-}
-
-static Datum
-gbt_int8_abbrev_convert(Datum original, SortSupport ssup)
-{
- int64KEY *b1 = (int64KEY *) DatumGetPointer(original);
- int64 z = b1->lower;
-
-#if SIZEOF_DATUM == 8
- return Int64GetDatum(z);
-#else
- return Int32GetDatum(z >> 32);
-#endif
-}
-
-static int
-gbt_int8_cmp_abbrev(Datum z1, Datum z2, SortSupport ssup)
-{
-#if SIZEOF_DATUM == 8
- int64 a = DatumGetInt64(z1);
- int64 b = DatumGetInt64(z2);
-#else
- int32 a = DatumGetInt32(z1);
- int32 b = DatumGetInt32(z2);
-#endif
-
- if (a > b)
- return 1;
- else if (a < b)
- return -1;
- else
- return 0;
-}
-
-/*
- * We never consider aborting the abbreviation.
- */
-static bool
-gbt_int8_abbrev_abort(int memtupcount, SortSupport ssup)
-{
- return false;
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_int8_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- if (ssup->abbreviate)
- {
- ssup->comparator = gbt_int8_cmp_abbrev;
- ssup->abbrev_converter = gbt_int8_abbrev_convert;
- ssup->abbrev_abort = gbt_int8_abbrev_abort;
- ssup->abbrev_full_comparator = gbt_int8_sort_build_cmp;
- }
- else
- {
- ssup->comparator = gbt_int8_sort_build_cmp;
- }
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_interval.c b/contrib/btree_gist/btree_interval.c
index 0041acd3ddd..a4b3b2b1e6f 100644
--- a/contrib/btree_gist/btree_interval.c
+++ b/contrib/btree_gist/btree_interval.c
@@ -27,7 +27,6 @@ PG_FUNCTION_INFO_V1(gbt_intv_consistent);
PG_FUNCTION_INFO_V1(gbt_intv_distance);
PG_FUNCTION_INFO_V1(gbt_intv_penalty);
PG_FUNCTION_INFO_V1(gbt_intv_same);
-PG_FUNCTION_INFO_V1(gbt_intv_sortsupport);
static bool
@@ -298,29 +297,3 @@ gbt_intv_same(PG_FUNCTION_ARGS)
*result = gbt_num_same((void *) b1, (void *) b2, &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
-
-static int
-gbt_intv_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- intvKEY *ia = (intvKEY *) DatumGetPointer(a);
- intvKEY *ib = (intvKEY *) DatumGetPointer(b);
-
- return DatumGetInt32(DirectFunctionCall2(interval_cmp,
- IntervalPGetDatum(&ia->lower),
- IntervalPGetDatum(&ib->lower)));
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_intv_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- ssup->comparator = gbt_intv_sort_build_cmp;
- ssup->abbrev_converter = NULL;
- ssup->abbrev_abort = NULL;
- ssup->abbrev_full_comparator = NULL;
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_macaddr.c b/contrib/btree_gist/btree_macaddr.c
index 805148575d7..7f0e9e9c912 100644
--- a/contrib/btree_gist/btree_macaddr.c
+++ b/contrib/btree_gist/btree_macaddr.c
@@ -25,7 +25,6 @@ PG_FUNCTION_INFO_V1(gbt_macad_picksplit);
PG_FUNCTION_INFO_V1(gbt_macad_consistent);
PG_FUNCTION_INFO_V1(gbt_macad_penalty);
PG_FUNCTION_INFO_V1(gbt_macad_same);
-PG_FUNCTION_INFO_V1(gbt_macad_sortsupport);
static bool
@@ -196,80 +195,3 @@ gbt_macad_same(PG_FUNCTION_ARGS)
*result = gbt_num_same((void *) b1, (void *) b2, &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
-
-static int
-gbt_macad_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- macKEY *ma = (macKEY *) DatumGetPointer(a);
- macKEY *mb = (macKEY *) DatumGetPointer(b);
- uint64 ia = mac_2_uint64(&ma->lower);
- uint64 ib = mac_2_uint64(&mb->lower);
-
- /* for leaf items we expect lower == upper */
-
- if (ia == ib)
- return 0;
-
- return (ia > ib) ? 1 : -1;
-}
-
-static Datum
-gbt_macad_abbrev_convert(Datum original, SortSupport ssup)
-{
- macKEY *b1 = (macKEY *) DatumGetPointer(original);
- uint64 z = mac_2_uint64(&b1->lower);
-
-#if SIZEOF_DATUM == 8
- return UInt64GetDatum(z);
-#else
- /* use the high 32 bits of the 48-bit integer */
- return UInt32GetDatum(z >> 16);
-#endif
-}
-
-static int
-gbt_macad_cmp_abbrev(Datum z1, Datum z2, SortSupport ssup)
-{
-#if SIZEOF_DATUM == 8
- uint64 a = DatumGetUInt64(z1);
- uint64 b = DatumGetUInt64(z2);
-#else
- uint32 a = DatumGetUInt32(z1);
- uint32 b = DatumGetUInt32(z2);
-#endif
-
- if (a > b)
- return 1;
- else if (a < b)
- return -1;
- else
- return 0;
-}
-
-static bool
-gbt_macad_abbrev_abort(int memtupcount, SortSupport ssup)
-{
- return false;
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_macad_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- if (ssup->abbreviate)
- {
- ssup->comparator = gbt_macad_cmp_abbrev;
- ssup->abbrev_converter = gbt_macad_abbrev_convert;
- ssup->abbrev_abort = gbt_macad_abbrev_abort;
- ssup->abbrev_full_comparator = gbt_macad_sort_build_cmp;
- }
- else
- {
- ssup->comparator = gbt_macad_sort_build_cmp;
- }
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_macaddr8.c b/contrib/btree_gist/btree_macaddr8.c
index a0514727e35..ab4bca5d50d 100644
--- a/contrib/btree_gist/btree_macaddr8.c
+++ b/contrib/btree_gist/btree_macaddr8.c
@@ -25,7 +25,6 @@ PG_FUNCTION_INFO_V1(gbt_macad8_picksplit);
PG_FUNCTION_INFO_V1(gbt_macad8_consistent);
PG_FUNCTION_INFO_V1(gbt_macad8_penalty);
PG_FUNCTION_INFO_V1(gbt_macad8_same);
-PG_FUNCTION_INFO_V1(gbt_macad8_sortsupport);
static bool
@@ -196,80 +195,3 @@ gbt_macad8_same(PG_FUNCTION_ARGS)
*result = gbt_num_same((void *) b1, (void *) b2, &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
-
-static int
-gbt_macad8_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- mac8KEY *ma = (mac8KEY *) DatumGetPointer(a);
- mac8KEY *mb = (mac8KEY *) DatumGetPointer(b);
- uint64 ia = mac8_2_uint64(&ma->lower);
- uint64 ib = mac8_2_uint64(&mb->lower);
-
- /* for leaf items we expect lower == upper */
-
- if (ia == ib)
- return 0;
-
- return (ia > ib) ? 1 : -1;
-}
-
-static Datum
-gbt_macad8_abbrev_convert(Datum original, SortSupport ssup)
-{
- mac8KEY *b1 = (mac8KEY *) DatumGetPointer(original);
- uint64 z = mac8_2_uint64(&b1->lower);
-
-#if SIZEOF_DATUM == 8
- return UInt64GetDatum(z);
-#else
- /* use the high bits only */
- return UInt32GetDatum(z >> 32);
-#endif
-}
-
-static int
-gbt_macad8_cmp_abbrev(Datum z1, Datum z2, SortSupport ssup)
-{
-#if SIZEOF_DATUM == 8
- uint64 a = DatumGetUInt64(z1);
- uint64 b = DatumGetUInt64(z2);
-#else
- uint32 a = DatumGetUInt32(z1);
- uint32 b = DatumGetUInt32(z2);
-#endif
-
- if (a > b)
- return 1;
- else if (a < b)
- return -1;
- else
- return 0;
-}
-
-static bool
-gbt_macad8_abbrev_abort(int memtupcount, SortSupport ssup)
-{
- return false;
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_macad8_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- if (ssup->abbreviate)
- {
- ssup->comparator = gbt_macad8_cmp_abbrev;
- ssup->abbrev_converter = gbt_macad8_abbrev_convert;
- ssup->abbrev_abort = gbt_macad8_abbrev_abort;
- ssup->abbrev_full_comparator = gbt_macad8_sort_build_cmp;
- }
- else
- {
- ssup->comparator = gbt_macad8_sort_build_cmp;
- }
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_numeric.c b/contrib/btree_gist/btree_numeric.c
index face4e2b3af..35e466cdd94 100644
--- a/contrib/btree_gist/btree_numeric.c
+++ b/contrib/btree_gist/btree_numeric.c
@@ -21,7 +21,6 @@ PG_FUNCTION_INFO_V1(gbt_numeric_picksplit);
PG_FUNCTION_INFO_V1(gbt_numeric_consistent);
PG_FUNCTION_INFO_V1(gbt_numeric_penalty);
PG_FUNCTION_INFO_V1(gbt_numeric_same);
-PG_FUNCTION_INFO_V1(gbt_numeric_sortsupport);
/* define for comparison */
@@ -228,31 +227,3 @@ gbt_numeric_picksplit(PG_FUNCTION_ARGS)
&tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(v);
}
-
-static int
-gbt_numeric_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- return DatumGetInt32(DirectFunctionCall2(numeric_cmp,
- PointerGetDatum(a),
- PointerGetDatum(b)));
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_numeric_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- ssup->comparator = gbt_numeric_sort_build_cmp;
-
- /*
- * Numeric has abbreviation routines in numeric.c, but we don't try to use
- * them here. Maybe later.
- */
- ssup->abbrev_converter = NULL;
- ssup->abbrev_abort = NULL;
- ssup->abbrev_full_comparator = NULL;
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_oid.c b/contrib/btree_gist/btree_oid.c
index 9b7c546aeeb..3cc7d4245d4 100644
--- a/contrib/btree_gist/btree_oid.c
+++ b/contrib/btree_gist/btree_oid.c
@@ -23,7 +23,6 @@ PG_FUNCTION_INFO_V1(gbt_oid_consistent);
PG_FUNCTION_INFO_V1(gbt_oid_distance);
PG_FUNCTION_INFO_V1(gbt_oid_penalty);
PG_FUNCTION_INFO_V1(gbt_oid_same);
-PG_FUNCTION_INFO_V1(gbt_oid_sortsupport);
static bool
@@ -216,72 +215,3 @@ gbt_oid_same(PG_FUNCTION_ARGS)
*result = gbt_num_same((void *) b1, (void *) b2, &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
-
-static int
-gbt_oid_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- oidKEY *ia = (oidKEY *) DatumGetPointer(a);
- oidKEY *ib = (oidKEY *) DatumGetPointer(b);
-
- /* for leaf items we expect lower == upper */
- Assert(ia->lower == ia->upper);
- Assert(ib->lower == ib->upper);
-
- if (ia->lower == ib->lower)
- return 0;
-
- return (ia->lower > ib->lower) ? 1 : -1;
-}
-
-static Datum
-gbt_oid_abbrev_convert(Datum original, SortSupport ssup)
-{
- oidKEY *b1 = (oidKEY *) DatumGetPointer(original);
-
- return ObjectIdGetDatum(b1->lower);
-}
-
-static int
-gbt_oid_cmp_abbrev(Datum z1, Datum z2, SortSupport ssup)
-{
- Oid a = DatumGetObjectId(z1);
- Oid b = DatumGetObjectId(z2);
-
- if (a > b)
- return 1;
- else if (a < b)
- return -1;
- else
- return 0;
-}
-
-/*
- * We never consider aborting the abbreviation.
- */
-static bool
-gbt_oid_abbrev_abort(int memtupcount, SortSupport ssup)
-{
- return false;
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_oid_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- if (ssup->abbreviate)
- {
- ssup->comparator = gbt_oid_cmp_abbrev;
- ssup->abbrev_converter = gbt_oid_abbrev_convert;
- ssup->abbrev_abort = gbt_oid_abbrev_abort;
- ssup->abbrev_full_comparator = gbt_oid_sort_build_cmp;
- }
- else
- {
- ssup->comparator = gbt_oid_sort_build_cmp;
- }
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_text.c b/contrib/btree_gist/btree_text.c
index 01b1bda2f66..8019d112819 100644
--- a/contrib/btree_gist/btree_text.c
+++ b/contrib/btree_gist/btree_text.c
@@ -18,7 +18,6 @@ PG_FUNCTION_INFO_V1(gbt_text_consistent);
PG_FUNCTION_INFO_V1(gbt_bpchar_consistent);
PG_FUNCTION_INFO_V1(gbt_text_penalty);
PG_FUNCTION_INFO_V1(gbt_text_same);
-PG_FUNCTION_INFO_V1(gbt_text_sortsupport);
/* define for comparison */
@@ -240,27 +239,3 @@ gbt_text_penalty(PG_FUNCTION_ARGS)
PG_RETURN_POINTER(gbt_var_penalty(result, o, n, PG_GET_COLLATION(),
&tinfo, fcinfo->flinfo));
}
-
-static int
-gbt_text_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- return DatumGetInt32(DirectFunctionCall2Coll(bttextcmp,
- ssup->ssup_collation,
- PointerGetDatum(a),
- PointerGetDatum(b)));
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_text_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- ssup->comparator = gbt_text_sort_build_cmp;
- ssup->abbrev_converter = NULL;
- ssup->abbrev_abort = NULL;
- ssup->abbrev_full_comparator = NULL;
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_time.c b/contrib/btree_gist/btree_time.c
index c021f675142..fd8774a2f08 100644
--- a/contrib/btree_gist/btree_time.c
+++ b/contrib/btree_gist/btree_time.c
@@ -28,7 +28,6 @@ PG_FUNCTION_INFO_V1(gbt_time_distance);
PG_FUNCTION_INFO_V1(gbt_timetz_consistent);
PG_FUNCTION_INFO_V1(gbt_time_penalty);
PG_FUNCTION_INFO_V1(gbt_time_same);
-PG_FUNCTION_INFO_V1(gbt_time_sortsupport);
#ifdef USE_FLOAT8_BYVAL
@@ -333,29 +332,3 @@ gbt_time_same(PG_FUNCTION_ARGS)
*result = gbt_num_same((void *) b1, (void *) b2, &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
-
-static int
-gbt_time_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- timeKEY *ia = (timeKEY *) DatumGetPointer(a);
- timeKEY *ib = (timeKEY *) DatumGetPointer(b);
-
- return DatumGetInt32(DirectFunctionCall2(time_cmp,
- TimeADTGetDatumFast(ia->lower),
- TimeADTGetDatumFast(ib->lower)));
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_time_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- ssup->comparator = gbt_time_sort_build_cmp;
- ssup->abbrev_converter = NULL;
- ssup->abbrev_abort = NULL;
- ssup->abbrev_full_comparator = NULL;
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_ts.c b/contrib/btree_gist/btree_ts.c
index c6ef0782d24..2671ba961cd 100644
--- a/contrib/btree_gist/btree_ts.c
+++ b/contrib/btree_gist/btree_ts.c
@@ -31,7 +31,6 @@ PG_FUNCTION_INFO_V1(gbt_tstz_consistent);
PG_FUNCTION_INFO_V1(gbt_tstz_distance);
PG_FUNCTION_INFO_V1(gbt_ts_penalty);
PG_FUNCTION_INFO_V1(gbt_ts_same);
-PG_FUNCTION_INFO_V1(gbt_ts_sortsupport);
#ifdef USE_FLOAT8_BYVAL
@@ -400,29 +399,3 @@ gbt_ts_same(PG_FUNCTION_ARGS)
*result = gbt_num_same((void *) b1, (void *) b2, &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
-
-static int
-gbt_ts_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- tsKEY *ia = (tsKEY *) DatumGetPointer(a);
- tsKEY *ib = (tsKEY *) DatumGetPointer(b);
-
- return DatumGetInt32(DirectFunctionCall2(timestamp_cmp,
- TimestampGetDatumFast(ia->lower),
- TimestampGetDatumFast(ib->lower)));
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_ts_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- ssup->comparator = gbt_ts_sort_build_cmp;
- ssup->abbrev_converter = NULL;
- ssup->abbrev_abort = NULL;
- ssup->abbrev_full_comparator = NULL;
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/btree_uuid.c b/contrib/btree_gist/btree_uuid.c
index c802bf95a90..b81875979a3 100644
--- a/contrib/btree_gist/btree_uuid.c
+++ b/contrib/btree_gist/btree_uuid.c
@@ -25,7 +25,6 @@ PG_FUNCTION_INFO_V1(gbt_uuid_picksplit);
PG_FUNCTION_INFO_V1(gbt_uuid_consistent);
PG_FUNCTION_INFO_V1(gbt_uuid_penalty);
PG_FUNCTION_INFO_V1(gbt_uuid_same);
-PG_FUNCTION_INFO_V1(gbt_uuid_sortsupport);
static int
@@ -234,27 +233,3 @@ gbt_uuid_same(PG_FUNCTION_ARGS)
*result = gbt_num_same((void *) b1, (void *) b2, &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
-
-static int
-gbt_uuid_sort_build_cmp(Datum a, Datum b, SortSupport ssup)
-{
- uuidKEY *ua = (uuidKEY *) DatumGetPointer(a);
- uuidKEY *ub = (uuidKEY *) DatumGetPointer(b);
-
- return uuid_internal_cmp(&ua->lower, &ub->lower);
-}
-
-/*
- * Sort support routine for fast GiST index build by sorting.
- */
-Datum
-gbt_uuid_sortsupport(PG_FUNCTION_ARGS)
-{
- SortSupport ssup = (SortSupport) PG_GETARG_POINTER(0);
-
- ssup->comparator = gbt_uuid_sort_build_cmp;
- ssup->abbrev_converter = NULL;
- ssup->abbrev_abort = NULL;
- ssup->abbrev_full_comparator = NULL;
- PG_RETURN_VOID();
-}
diff --git a/contrib/btree_gist/expected/bit.out b/contrib/btree_gist/expected/bit.out
index cb2297ce806..e57871f310b 100644
--- a/contrib/btree_gist/expected/bit.out
+++ b/contrib/btree_gist/expected/bit.out
@@ -32,14 +32,7 @@ SELECT count(*) FROM bittmp WHERE a > '011011000100010111011000110000100';
350
(1 row)
-SET client_min_messages = DEBUG1;
CREATE INDEX bitidx ON bittmp USING GIST ( a );
-DEBUG: building index "bitidx" on table "bittmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX bitidx_b ON bittmp USING GIST ( a ) WITH (buffering=on);
-DEBUG: building index "bitidx_b" on table "bittmp" serially
-DROP INDEX bitidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM bittmp WHERE a < '011011000100010111011000110000100';
count
diff --git a/contrib/btree_gist/expected/bytea.out b/contrib/btree_gist/expected/bytea.out
index 170b48e1db9..b9efa73c085 100644
--- a/contrib/btree_gist/expected/bytea.out
+++ b/contrib/btree_gist/expected/bytea.out
@@ -33,14 +33,7 @@ SELECT count(*) FROM byteatmp WHERE a > '31b0';
400
(1 row)
-SET client_min_messages = DEBUG1;
CREATE INDEX byteaidx ON byteatmp USING GIST ( a );
-DEBUG: building index "byteaidx" on table "byteatmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX byteaidx_b ON byteatmp USING GIST ( a ) WITH (buffering=on);
-DEBUG: building index "byteaidx_b" on table "byteatmp" serially
-DROP INDEX byteaidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM byteatmp WHERE a < '31b0'::bytea;
count
diff --git a/contrib/btree_gist/expected/cash.out b/contrib/btree_gist/expected/cash.out
index 868af70b22c..7fbc7355929 100644
--- a/contrib/btree_gist/expected/cash.out
+++ b/contrib/btree_gist/expected/cash.out
@@ -40,14 +40,7 @@ SELECT a, a <-> '21472.79' FROM moneytmp ORDER BY a <-> '21472.79' LIMIT 3;
$21,915.01 | $442.22
(3 rows)
-SET client_min_messages = DEBUG1;
CREATE INDEX moneyidx ON moneytmp USING gist ( a );
-DEBUG: building index "moneyidx" on table "moneytmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX moneyidx_b ON moneytmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "moneyidx_b" on table "moneytmp" serially
-DROP INDEX moneyidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM moneytmp WHERE a < '22649.64'::money;
count
diff --git a/contrib/btree_gist/expected/char.out b/contrib/btree_gist/expected/char.out
index 97316cbb06b..d715c045cc1 100644
--- a/contrib/btree_gist/expected/char.out
+++ b/contrib/btree_gist/expected/char.out
@@ -32,14 +32,7 @@ SELECT count(*) FROM chartmp WHERE a > '31b0'::char(32);
400
(1 row)
-SET client_min_messages = DEBUG1;
CREATE INDEX charidx ON chartmp USING GIST ( a );
-DEBUG: building index "charidx" on table "chartmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX charidx_b ON chartmp USING GIST ( a ) WITH (buffering=on);
-DEBUG: building index "charidx_b" on table "chartmp" serially
-DROP INDEX charidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM chartmp WHERE a < '31b0'::char(32);
count
diff --git a/contrib/btree_gist/expected/cidr.out b/contrib/btree_gist/expected/cidr.out
index f15597c06a0..6d0995add60 100644
--- a/contrib/btree_gist/expected/cidr.out
+++ b/contrib/btree_gist/expected/cidr.out
@@ -32,14 +32,7 @@ SELECT count(*) FROM cidrtmp WHERE a > '121.111.63.82';
309
(1 row)
-SET client_min_messages = DEBUG1;
CREATE INDEX cidridx ON cidrtmp USING gist ( a );
-DEBUG: building index "cidridx" on table "cidrtmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX cidridx_b ON cidrtmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "cidridx_b" on table "cidrtmp" serially
-DROP INDEX cidridx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM cidrtmp WHERE a < '121.111.63.82'::cidr;
count
diff --git a/contrib/btree_gist/expected/date.out b/contrib/btree_gist/expected/date.out
index 5c93d02209c..5db864bb82c 100644
--- a/contrib/btree_gist/expected/date.out
+++ b/contrib/btree_gist/expected/date.out
@@ -40,14 +40,7 @@ SELECT a, a <-> '2001-02-13' FROM datetmp ORDER BY a <-> '2001-02-13' LIMIT 3;
03-24-2001 | 39
(3 rows)
-SET client_min_messages = DEBUG1;
CREATE INDEX dateidx ON datetmp USING gist ( a );
-DEBUG: building index "dateidx" on table "datetmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX dateidx_b ON datetmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "dateidx_b" on table "datetmp" serially
-DROP INDEX dateidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM datetmp WHERE a < '2001-02-13'::date;
count
diff --git a/contrib/btree_gist/expected/enum.out b/contrib/btree_gist/expected/enum.out
index d73ad33974d..c4b769dd4b7 100644
--- a/contrib/btree_gist/expected/enum.out
+++ b/contrib/btree_gist/expected/enum.out
@@ -46,14 +46,7 @@ SELECT count(*) FROM enumtmp WHERE a > 'g'::rainbow;
230
(1 row)
-SET client_min_messages = DEBUG1;
CREATE INDEX enumidx ON enumtmp USING gist ( a );
-DEBUG: building index "enumidx" on table "enumtmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX enumidx_b ON enumtmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "enumidx_b" on table "enumtmp" serially
-DROP INDEX enumidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM enumtmp WHERE a < 'g'::rainbow;
count
diff --git a/contrib/btree_gist/expected/float4.out b/contrib/btree_gist/expected/float4.out
index 5f4f1aa4ec5..dfe732049e6 100644
--- a/contrib/btree_gist/expected/float4.out
+++ b/contrib/btree_gist/expected/float4.out
@@ -40,14 +40,7 @@ SELECT a, a <-> '-179.0' FROM float4tmp ORDER BY a <-> '-179.0' LIMIT 3;
-158.17741 | 20.822586
(3 rows)
-SET client_min_messages = DEBUG1;
CREATE INDEX float4idx ON float4tmp USING gist ( a );
-DEBUG: building index "float4idx" on table "float4tmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX float4idx_b ON float4tmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "float4idx_b" on table "float4tmp" serially
-DROP INDEX float4idx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM float4tmp WHERE a < -179.0::float4;
count
diff --git a/contrib/btree_gist/expected/float8.out b/contrib/btree_gist/expected/float8.out
index 4db0f7b8282..ebd0ef3d689 100644
--- a/contrib/btree_gist/expected/float8.out
+++ b/contrib/btree_gist/expected/float8.out
@@ -40,14 +40,7 @@ SELECT a, a <-> '-1890.0' FROM float8tmp ORDER BY a <-> '-1890.0' LIMIT 3;
-1769.73634 | 120.26366000000007
(3 rows)
-SET client_min_messages = DEBUG1;
CREATE INDEX float8idx ON float8tmp USING gist ( a );
-DEBUG: building index "float8idx" on table "float8tmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX float8idx_b ON float8tmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "float8idx_b" on table "float8tmp" serially
-DROP INDEX float8idx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM float8tmp WHERE a < -1890.0::float8;
count
diff --git a/contrib/btree_gist/expected/inet.out b/contrib/btree_gist/expected/inet.out
index 0847d3b7d12..c323d903da4 100644
--- a/contrib/btree_gist/expected/inet.out
+++ b/contrib/btree_gist/expected/inet.out
@@ -32,14 +32,7 @@ SELECT count(*) FROM inettmp WHERE a > '89.225.196.191';
386
(1 row)
-SET client_min_messages = DEBUG1;
CREATE INDEX inetidx ON inettmp USING gist ( a );
-DEBUG: building index "inetidx" on table "inettmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX inetidx_b ON inettmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "inetidx_b" on table "inettmp" serially
-DROP INDEX inetidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM inettmp WHERE a < '89.225.196.191'::inet;
count
diff --git a/contrib/btree_gist/expected/int2.out b/contrib/btree_gist/expected/int2.out
index 9ad06a8dce0..50a332939bd 100644
--- a/contrib/btree_gist/expected/int2.out
+++ b/contrib/btree_gist/expected/int2.out
@@ -40,14 +40,7 @@ SELECT a, a <-> '237' FROM int2tmp ORDER BY a <-> '237' LIMIT 3;
228 | 9
(3 rows)
-SET client_min_messages = DEBUG1;
CREATE INDEX int2idx ON int2tmp USING gist ( a );
-DEBUG: building index "int2idx" on table "int2tmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX int2idx_b ON int2tmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "int2idx_b" on table "int2tmp" serially
-DROP INDEX int2idx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM int2tmp WHERE a < 237::int2;
count
diff --git a/contrib/btree_gist/expected/int4.out b/contrib/btree_gist/expected/int4.out
index fdf143f32c3..6bbdc7c3f4b 100644
--- a/contrib/btree_gist/expected/int4.out
+++ b/contrib/btree_gist/expected/int4.out
@@ -40,14 +40,7 @@ SELECT a, a <-> '237' FROM int4tmp ORDER BY a <-> '237' LIMIT 3;
228 | 9
(3 rows)
-SET client_min_messages = DEBUG1;
CREATE INDEX int4idx ON int4tmp USING gist ( a );
-DEBUG: building index "int4idx" on table "int4tmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX int4idx_b ON int4tmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "int4idx_b" on table "int4tmp" serially
-DROP INDEX int4idx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM int4tmp WHERE a < 237::int4;
count
diff --git a/contrib/btree_gist/expected/int8.out b/contrib/btree_gist/expected/int8.out
index 532c4e5e704..eff77c26b5a 100644
--- a/contrib/btree_gist/expected/int8.out
+++ b/contrib/btree_gist/expected/int8.out
@@ -40,14 +40,7 @@ SELECT a, a <-> '464571291354841' FROM int8tmp ORDER BY a <-> '464571291354841'
478227196042750 | 13655904687909
(3 rows)
-SET client_min_messages = DEBUG1;
CREATE INDEX int8idx ON int8tmp USING gist ( a );
-DEBUG: building index "int8idx" on table "int8tmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX int8idx_b ON int8tmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "int8idx_b" on table "int8tmp" serially
-DROP INDEX int8idx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM int8tmp WHERE a < 464571291354841::int8;
count
diff --git a/contrib/btree_gist/expected/interval.out b/contrib/btree_gist/expected/interval.out
index 12d50fdf581..4c3d494e4a6 100644
--- a/contrib/btree_gist/expected/interval.out
+++ b/contrib/btree_gist/expected/interval.out
@@ -40,14 +40,7 @@ SELECT a, a <-> '199 days 21:21:23' FROM intervaltmp ORDER BY a <-> '199 days 21
@ 220 days 19 hours 5 mins 42 secs | @ 21 days -2 hours -15 mins -41 secs
(3 rows)
-SET client_min_messages = DEBUG1;
CREATE INDEX intervalidx ON intervaltmp USING gist ( a );
-DEBUG: building index "intervalidx" on table "intervaltmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX intervalidx_b ON intervaltmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "intervalidx_b" on table "intervaltmp" serially
-DROP INDEX intervalidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM intervaltmp WHERE a < '199 days 21:21:23'::interval;
count
diff --git a/contrib/btree_gist/expected/macaddr.out b/contrib/btree_gist/expected/macaddr.out
index 9634000618f..c0a4c6287f3 100644
--- a/contrib/btree_gist/expected/macaddr.out
+++ b/contrib/btree_gist/expected/macaddr.out
@@ -32,14 +32,7 @@ SELECT count(*) FROM macaddrtmp WHERE a > '22:00:5c:e5:9b:0d';
540
(1 row)
-SET client_min_messages = DEBUG1;
CREATE INDEX macaddridx ON macaddrtmp USING gist ( a );
-DEBUG: building index "macaddridx" on table "macaddrtmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX macaddridx_b ON macaddrtmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "macaddridx_b" on table "macaddrtmp" serially
-DROP INDEX macaddridx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM macaddrtmp WHERE a < '22:00:5c:e5:9b:0d'::macaddr;
count
diff --git a/contrib/btree_gist/expected/macaddr8.out b/contrib/btree_gist/expected/macaddr8.out
index 910223cd3b2..e5ec6a5deab 100644
--- a/contrib/btree_gist/expected/macaddr8.out
+++ b/contrib/btree_gist/expected/macaddr8.out
@@ -32,14 +32,7 @@ SELECT count(*) FROM macaddr8tmp WHERE a > '22:00:5c:e5:9b:0d';
540
(1 row)
-SET client_min_messages = DEBUG1;
CREATE INDEX macaddr8idx ON macaddr8tmp USING gist ( a );
-DEBUG: building index "macaddr8idx" on table "macaddr8tmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX macaddr8idx_b ON macaddr8tmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "macaddr8idx_b" on table "macaddr8tmp" serially
-DROP INDEX macaddr8idx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM macaddr8tmp WHERE a < '22:00:5c:e5:9b:0d'::macaddr8;
count
diff --git a/contrib/btree_gist/expected/numeric.out b/contrib/btree_gist/expected/numeric.out
index 8dce480c303..ae839b8ec83 100644
--- a/contrib/btree_gist/expected/numeric.out
+++ b/contrib/btree_gist/expected/numeric.out
@@ -94,14 +94,7 @@ SELECT count(*) FROM numerictmp WHERE a > 0 ;
576
(1 row)
-SET client_min_messages = DEBUG1;
CREATE INDEX numericidx ON numerictmp USING gist ( a );
-DEBUG: building index "numericidx" on table "numerictmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX numericidx_b ON numerictmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "numericidx_b" on table "numerictmp" serially
-DROP INDEX numericidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM numerictmp WHERE a < -1890.0;
count
diff --git a/contrib/btree_gist/expected/oid.out b/contrib/btree_gist/expected/oid.out
index da27172609b..776bbb10267 100644
--- a/contrib/btree_gist/expected/oid.out
+++ b/contrib/btree_gist/expected/oid.out
@@ -32,14 +32,7 @@ SELECT count(*) FROM oidtmp WHERE oid > 17;
983
(1 row)
-SET client_min_messages = DEBUG1;
CREATE INDEX oididx ON oidtmp USING gist ( oid );
-DEBUG: building index "oididx" on table "oidtmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX oididx_b ON oidtmp USING gist ( oid ) WITH (buffering=on);
-DEBUG: building index "oididx_b" on table "oidtmp" serially
-DROP INDEX oididx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM oidtmp WHERE oid < 17;
count
diff --git a/contrib/btree_gist/expected/text.out b/contrib/btree_gist/expected/text.out
index 2e760d14871..bb4e2e62d1d 100644
--- a/contrib/btree_gist/expected/text.out
+++ b/contrib/btree_gist/expected/text.out
@@ -33,14 +33,7 @@ SELECT count(*) FROM texttmp WHERE a > '31b0';
400
(1 row)
-SET client_min_messages = DEBUG1;
CREATE INDEX textidx ON texttmp USING GIST ( a );
-DEBUG: building index "textidx" on table "texttmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX textidx_b ON texttmp USING GIST ( a ) WITH (buffering=on);
-DEBUG: building index "textidx_b" on table "texttmp" serially
-DROP INDEX textidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM texttmp WHERE a < '31b0'::text;
count
diff --git a/contrib/btree_gist/expected/time.out b/contrib/btree_gist/expected/time.out
index 9b81e58ed4d..ec95ef77c57 100644
--- a/contrib/btree_gist/expected/time.out
+++ b/contrib/btree_gist/expected/time.out
@@ -40,14 +40,7 @@ SELECT a, a <-> '10:57:11' FROM timetmp ORDER BY a <-> '10:57:11' LIMIT 3;
10:55:32 | @ 1 min 39 secs
(3 rows)
-SET client_min_messages = DEBUG1;
CREATE INDEX timeidx ON timetmp USING gist ( a );
-DEBUG: building index "timeidx" on table "timetmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX timeidx_b ON timetmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "timeidx_b" on table "timetmp" serially
-DROP INDEX timeidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM timetmp WHERE a < '10:57:11'::time;
count
diff --git a/contrib/btree_gist/expected/timestamp.out b/contrib/btree_gist/expected/timestamp.out
index 8ea9897551c..0d94f2f245c 100644
--- a/contrib/btree_gist/expected/timestamp.out
+++ b/contrib/btree_gist/expected/timestamp.out
@@ -40,14 +40,7 @@ SELECT a, a <-> '2004-10-26 08:55:08' FROM timestamptmp ORDER BY a <-> '2004-10-
Mon Nov 29 20:12:43 2004 | @ 34 days 11 hours 17 mins 35 secs
(3 rows)
-SET client_min_messages = DEBUG1;
CREATE INDEX timestampidx ON timestamptmp USING gist ( a );
-DEBUG: building index "timestampidx" on table "timestamptmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX timestampidx_b ON timestamptmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "timestampidx_b" on table "timestamptmp" serially
-DROP INDEX timestampidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM timestamptmp WHERE a < '2004-10-26 08:55:08'::timestamp;
count
diff --git a/contrib/btree_gist/expected/timestamptz.out b/contrib/btree_gist/expected/timestamptz.out
index 2ba0dcd7ede..75a15a42568 100644
--- a/contrib/btree_gist/expected/timestamptz.out
+++ b/contrib/btree_gist/expected/timestamptz.out
@@ -100,14 +100,7 @@ SELECT a, a <-> '2018-12-18 10:59:54 GMT+2' FROM timestamptztmp ORDER BY a <-> '
Thu Jan 24 12:28:12 2019 PST | @ 37 days 7 hours 28 mins 18 secs
(3 rows)
-SET client_min_messages = DEBUG1;
CREATE INDEX timestamptzidx ON timestamptztmp USING gist ( a );
-DEBUG: building index "timestamptzidx" on table "timestamptztmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX timestamptzidx_b ON timestamptztmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "timestamptzidx_b" on table "timestamptztmp" serially
-DROP INDEX timestamptzidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM timestamptztmp WHERE a < '2018-12-18 10:59:54 GMT+3'::timestamptz;
count
diff --git a/contrib/btree_gist/expected/timetz.out b/contrib/btree_gist/expected/timetz.out
index 6c855bfcd64..7f73e447977 100644
--- a/contrib/btree_gist/expected/timetz.out
+++ b/contrib/btree_gist/expected/timetz.out
@@ -18,14 +18,7 @@ INSERT INTO timetzcmp (r_id,a) SELECT 22,count(*) FROM timetztmp WHERE a <= '07:
INSERT INTO timetzcmp (r_id,a) SELECT 23,count(*) FROM timetztmp WHERE a = '07:46:45 GMT+4';
INSERT INTO timetzcmp (r_id,a) SELECT 24,count(*) FROM timetztmp WHERE a >= '07:46:45 GMT+4';
INSERT INTO timetzcmp (r_id,a) SELECT 25,count(*) FROM timetztmp WHERE a > '07:46:45 GMT+4';
-SET client_min_messages = DEBUG1;
CREATE INDEX timetzidx ON timetztmp USING gist ( a );
-DEBUG: building index "timetzidx" on table "timetztmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX timetzidx_b ON timetztmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "timetzidx_b" on table "timetztmp" serially
-DROP INDEX timetzidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a < '07:46:45 GMT+3'::timetz ) q WHERE r_id=1 ;
UPDATE timetzcmp SET b=c FROM ( SELECT count(*) AS c FROM timetztmp WHERE a <= '07:46:45 GMT+3'::timetz ) q WHERE r_id=2 ;
diff --git a/contrib/btree_gist/expected/uuid.out b/contrib/btree_gist/expected/uuid.out
index 0f0f2960392..a34b0246032 100644
--- a/contrib/btree_gist/expected/uuid.out
+++ b/contrib/btree_gist/expected/uuid.out
@@ -32,14 +32,7 @@ SELECT count(*) FROM uuidtmp WHERE a > '55e65ca2-4136-4a4b-ba78-cd3fe4678203';
375
(1 row)
-SET client_min_messages = DEBUG1;
CREATE INDEX uuididx ON uuidtmp USING gist ( a );
-DEBUG: building index "uuididx" on table "uuidtmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX uuididx_b ON uuidtmp USING gist ( a ) WITH (buffering=on);
-DEBUG: building index "uuididx_b" on table "uuidtmp" serially
-DROP INDEX uuididx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM uuidtmp WHERE a < '55e65ca2-4136-4a4b-ba78-cd3fe4678203'::uuid;
count
diff --git a/contrib/btree_gist/expected/varbit.out b/contrib/btree_gist/expected/varbit.out
index 9cd41f4c9aa..ede36bc3ead 100644
--- a/contrib/btree_gist/expected/varbit.out
+++ b/contrib/btree_gist/expected/varbit.out
@@ -32,14 +32,7 @@ SELECT count(*) FROM varbittmp WHERE a > '1110100111010';
50
(1 row)
-SET client_min_messages = DEBUG1;
CREATE INDEX varbitidx ON varbittmp USING GIST ( a );
-DEBUG: building index "varbitidx" on table "varbittmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX varbitidx_b ON varbittmp USING GIST ( a ) WITH (buffering=on);
-DEBUG: building index "varbitidx_b" on table "varbittmp" serially
-DROP INDEX varbitidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM varbittmp WHERE a < '1110100111010'::varbit;
count
diff --git a/contrib/btree_gist/expected/varchar.out b/contrib/btree_gist/expected/varchar.out
index 0520eb47315..d071d714cdd 100644
--- a/contrib/btree_gist/expected/varchar.out
+++ b/contrib/btree_gist/expected/varchar.out
@@ -32,14 +32,7 @@ SELECT count(*) FROM vchartmp WHERE a > '31b0'::varchar(32);
400
(1 row)
-SET client_min_messages = DEBUG1;
CREATE INDEX vcharidx ON vchartmp USING GIST ( text(a) );
-DEBUG: building index "vcharidx" on table "vchartmp" serially
-DEBUG: using sorted GiST build
-CREATE INDEX vcharidx_b ON vchartmp USING GIST ( text(a) ) WITH (buffering=on);
-DEBUG: building index "vcharidx_b" on table "vchartmp" serially
-DROP INDEX vcharidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
SELECT count(*) FROM vchartmp WHERE a < '31b0'::varchar(32);
count
diff --git a/contrib/btree_gist/sql/bit.sql b/contrib/btree_gist/sql/bit.sql
index 53c67cf77ac..a733042023f 100644
--- a/contrib/btree_gist/sql/bit.sql
+++ b/contrib/btree_gist/sql/bit.sql
@@ -16,11 +16,7 @@ SELECT count(*) FROM bittmp WHERE a >= '011011000100010111011000110000100';
SELECT count(*) FROM bittmp WHERE a > '011011000100010111011000110000100';
-SET client_min_messages = DEBUG1;
CREATE INDEX bitidx ON bittmp USING GIST ( a );
-CREATE INDEX bitidx_b ON bittmp USING GIST ( a ) WITH (buffering=on);
-DROP INDEX bitidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/bytea.sql b/contrib/btree_gist/sql/bytea.sql
index fdfa0c345bd..6885f5e56d5 100644
--- a/contrib/btree_gist/sql/bytea.sql
+++ b/contrib/btree_gist/sql/bytea.sql
@@ -17,11 +17,7 @@ SELECT count(*) FROM byteatmp WHERE a >= '31b0';
SELECT count(*) FROM byteatmp WHERE a > '31b0';
-SET client_min_messages = DEBUG1;
CREATE INDEX byteaidx ON byteatmp USING GIST ( a );
-CREATE INDEX byteaidx_b ON byteatmp USING GIST ( a ) WITH (buffering=on);
-DROP INDEX byteaidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/cash.sql b/contrib/btree_gist/sql/cash.sql
index 0581b3593ef..4526cc4f0aa 100644
--- a/contrib/btree_gist/sql/cash.sql
+++ b/contrib/btree_gist/sql/cash.sql
@@ -18,11 +18,7 @@ SELECT count(*) FROM moneytmp WHERE a > '22649.64';
SELECT a, a <-> '21472.79' FROM moneytmp ORDER BY a <-> '21472.79' LIMIT 3;
-SET client_min_messages = DEBUG1;
CREATE INDEX moneyidx ON moneytmp USING gist ( a );
-CREATE INDEX moneyidx_b ON moneytmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX moneyidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/char.sql b/contrib/btree_gist/sql/char.sql
index 234eabee3b8..f6eb52e6724 100644
--- a/contrib/btree_gist/sql/char.sql
+++ b/contrib/btree_gist/sql/char.sql
@@ -16,11 +16,7 @@ SELECT count(*) FROM chartmp WHERE a >= '31b0'::char(32);
SELECT count(*) FROM chartmp WHERE a > '31b0'::char(32);
-SET client_min_messages = DEBUG1;
CREATE INDEX charidx ON chartmp USING GIST ( a );
-CREATE INDEX charidx_b ON chartmp USING GIST ( a ) WITH (buffering=on);
-DROP INDEX charidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/cidr.sql b/contrib/btree_gist/sql/cidr.sql
index be2d22b079a..9bd77185b96 100644
--- a/contrib/btree_gist/sql/cidr.sql
+++ b/contrib/btree_gist/sql/cidr.sql
@@ -15,11 +15,7 @@ SELECT count(*) FROM cidrtmp WHERE a >= '121.111.63.82';
SELECT count(*) FROM cidrtmp WHERE a > '121.111.63.82';
-SET client_min_messages = DEBUG1;
CREATE INDEX cidridx ON cidrtmp USING gist ( a );
-CREATE INDEX cidridx_b ON cidrtmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX cidridx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/date.sql b/contrib/btree_gist/sql/date.sql
index f007402bacc..f969ef0a08c 100644
--- a/contrib/btree_gist/sql/date.sql
+++ b/contrib/btree_gist/sql/date.sql
@@ -18,11 +18,7 @@ SELECT count(*) FROM datetmp WHERE a > '2001-02-13';
SELECT a, a <-> '2001-02-13' FROM datetmp ORDER BY a <-> '2001-02-13' LIMIT 3;
-SET client_min_messages = DEBUG1;
CREATE INDEX dateidx ON datetmp USING gist ( a );
-CREATE INDEX dateidx_b ON datetmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX dateidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/enum.sql b/contrib/btree_gist/sql/enum.sql
index d6dbcb42392..476211e9795 100644
--- a/contrib/btree_gist/sql/enum.sql
+++ b/contrib/btree_gist/sql/enum.sql
@@ -20,11 +20,7 @@ SELECT count(*) FROM enumtmp WHERE a >= 'g'::rainbow;
SELECT count(*) FROM enumtmp WHERE a > 'g'::rainbow;
-SET client_min_messages = DEBUG1;
CREATE INDEX enumidx ON enumtmp USING gist ( a );
-CREATE INDEX enumidx_b ON enumtmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX enumidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/float4.sql b/contrib/btree_gist/sql/float4.sql
index 0e3eb49343f..3da1ce953c8 100644
--- a/contrib/btree_gist/sql/float4.sql
+++ b/contrib/btree_gist/sql/float4.sql
@@ -18,11 +18,7 @@ SELECT count(*) FROM float4tmp WHERE a > -179.0;
SELECT a, a <-> '-179.0' FROM float4tmp ORDER BY a <-> '-179.0' LIMIT 3;
-SET client_min_messages = DEBUG1;
CREATE INDEX float4idx ON float4tmp USING gist ( a );
-CREATE INDEX float4idx_b ON float4tmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX float4idx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/float8.sql b/contrib/btree_gist/sql/float8.sql
index 6a216dd6065..e1e819b37f9 100644
--- a/contrib/btree_gist/sql/float8.sql
+++ b/contrib/btree_gist/sql/float8.sql
@@ -18,11 +18,7 @@ SELECT count(*) FROM float8tmp WHERE a > -1890.0;
SELECT a, a <-> '-1890.0' FROM float8tmp ORDER BY a <-> '-1890.0' LIMIT 3;
-SET client_min_messages = DEBUG1;
CREATE INDEX float8idx ON float8tmp USING gist ( a );
-CREATE INDEX float8idx_b ON float8tmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX float8idx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/inet.sql b/contrib/btree_gist/sql/inet.sql
index 0339c853d38..4b8d354b00e 100644
--- a/contrib/btree_gist/sql/inet.sql
+++ b/contrib/btree_gist/sql/inet.sql
@@ -16,11 +16,7 @@ SELECT count(*) FROM inettmp WHERE a >= '89.225.196.191';
SELECT count(*) FROM inettmp WHERE a > '89.225.196.191';
-SET client_min_messages = DEBUG1;
CREATE INDEX inetidx ON inettmp USING gist ( a );
-CREATE INDEX inetidx_b ON inettmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX inetidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/int2.sql b/contrib/btree_gist/sql/int2.sql
index bf98ac65f83..988518795fc 100644
--- a/contrib/btree_gist/sql/int2.sql
+++ b/contrib/btree_gist/sql/int2.sql
@@ -18,11 +18,7 @@ SELECT count(*) FROM int2tmp WHERE a > 237;
SELECT a, a <-> '237' FROM int2tmp ORDER BY a <-> '237' LIMIT 3;
-SET client_min_messages = DEBUG1;
CREATE INDEX int2idx ON int2tmp USING gist ( a );
-CREATE INDEX int2idx_b ON int2tmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX int2idx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/int4.sql b/contrib/btree_gist/sql/int4.sql
index 214993314af..659ab5ee24b 100644
--- a/contrib/btree_gist/sql/int4.sql
+++ b/contrib/btree_gist/sql/int4.sql
@@ -18,11 +18,7 @@ SELECT count(*) FROM int4tmp WHERE a > 237;
SELECT a, a <-> '237' FROM int4tmp ORDER BY a <-> '237' LIMIT 3;
-SET client_min_messages = DEBUG1;
CREATE INDEX int4idx ON int4tmp USING gist ( a );
-CREATE INDEX int4idx_b ON int4tmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX int4idx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/int8.sql b/contrib/btree_gist/sql/int8.sql
index 8a6c2a4bfd1..51e55e9c14b 100644
--- a/contrib/btree_gist/sql/int8.sql
+++ b/contrib/btree_gist/sql/int8.sql
@@ -18,11 +18,7 @@ SELECT count(*) FROM int8tmp WHERE a > 464571291354841;
SELECT a, a <-> '464571291354841' FROM int8tmp ORDER BY a <-> '464571291354841' LIMIT 3;
-SET client_min_messages = DEBUG1;
CREATE INDEX int8idx ON int8tmp USING gist ( a );
-CREATE INDEX int8idx_b ON int8tmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX int8idx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/interval.sql b/contrib/btree_gist/sql/interval.sql
index 6f9b1d4a39a..346d6adcb51 100644
--- a/contrib/btree_gist/sql/interval.sql
+++ b/contrib/btree_gist/sql/interval.sql
@@ -18,11 +18,7 @@ SELECT count(*) FROM intervaltmp WHERE a > '199 days 21:21:23';
SELECT a, a <-> '199 days 21:21:23' FROM intervaltmp ORDER BY a <-> '199 days 21:21:23' LIMIT 3;
-SET client_min_messages = DEBUG1;
CREATE INDEX intervalidx ON intervaltmp USING gist ( a );
-CREATE INDEX intervalidx_b ON intervaltmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX intervalidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/macaddr.sql b/contrib/btree_gist/sql/macaddr.sql
index bccfc820ca4..85c271f7ce3 100644
--- a/contrib/btree_gist/sql/macaddr.sql
+++ b/contrib/btree_gist/sql/macaddr.sql
@@ -16,11 +16,7 @@ SELECT count(*) FROM macaddrtmp WHERE a >= '22:00:5c:e5:9b:0d';
SELECT count(*) FROM macaddrtmp WHERE a > '22:00:5c:e5:9b:0d';
-SET client_min_messages = DEBUG1;
CREATE INDEX macaddridx ON macaddrtmp USING gist ( a );
-CREATE INDEX macaddridx_b ON macaddrtmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX macaddridx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/macaddr8.sql b/contrib/btree_gist/sql/macaddr8.sql
index 2d0447a777b..61e7d7af405 100644
--- a/contrib/btree_gist/sql/macaddr8.sql
+++ b/contrib/btree_gist/sql/macaddr8.sql
@@ -16,11 +16,7 @@ SELECT count(*) FROM macaddr8tmp WHERE a >= '22:00:5c:e5:9b:0d';
SELECT count(*) FROM macaddr8tmp WHERE a > '22:00:5c:e5:9b:0d';
-SET client_min_messages = DEBUG1;
CREATE INDEX macaddr8idx ON macaddr8tmp USING gist ( a );
-CREATE INDEX macaddr8idx_b ON macaddr8tmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX macaddr8idx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/numeric.sql b/contrib/btree_gist/sql/numeric.sql
index 55ecbcdadc5..dbb2f2f1838 100644
--- a/contrib/btree_gist/sql/numeric.sql
+++ b/contrib/btree_gist/sql/numeric.sql
@@ -40,11 +40,7 @@ SELECT count(*) FROM numerictmp WHERE a >= 0 ;
SELECT count(*) FROM numerictmp WHERE a > 0 ;
-SET client_min_messages = DEBUG1;
CREATE INDEX numericidx ON numerictmp USING gist ( a );
-CREATE INDEX numericidx_b ON numerictmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX numericidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/oid.sql b/contrib/btree_gist/sql/oid.sql
index bc9ee0cba34..c9358234ce9 100644
--- a/contrib/btree_gist/sql/oid.sql
+++ b/contrib/btree_gist/sql/oid.sql
@@ -15,11 +15,7 @@ SELECT count(*) FROM oidtmp WHERE oid >= 17;
SELECT count(*) FROM oidtmp WHERE oid > 17;
-SET client_min_messages = DEBUG1;
CREATE INDEX oididx ON oidtmp USING gist ( oid );
-CREATE INDEX oididx_b ON oidtmp USING gist ( oid ) WITH (buffering=on);
-DROP INDEX oididx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/text.sql b/contrib/btree_gist/sql/text.sql
index 52705a216d1..46597e731d6 100644
--- a/contrib/btree_gist/sql/text.sql
+++ b/contrib/btree_gist/sql/text.sql
@@ -17,11 +17,7 @@ SELECT count(*) FROM texttmp WHERE a >= '31b0';
SELECT count(*) FROM texttmp WHERE a > '31b0';
-SET client_min_messages = DEBUG1;
CREATE INDEX textidx ON texttmp USING GIST ( a );
-CREATE INDEX textidx_b ON texttmp USING GIST ( a ) WITH (buffering=on);
-DROP INDEX textidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/time.sql b/contrib/btree_gist/sql/time.sql
index 61239452131..6104e7f61c8 100644
--- a/contrib/btree_gist/sql/time.sql
+++ b/contrib/btree_gist/sql/time.sql
@@ -18,11 +18,7 @@ SELECT count(*) FROM timetmp WHERE a > '10:57:11';
SELECT a, a <-> '10:57:11' FROM timetmp ORDER BY a <-> '10:57:11' LIMIT 3;
-SET client_min_messages = DEBUG1;
CREATE INDEX timeidx ON timetmp USING gist ( a );
-CREATE INDEX timeidx_b ON timetmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX timeidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/timestamp.sql b/contrib/btree_gist/sql/timestamp.sql
index 66a14f5ae51..95effebfc47 100644
--- a/contrib/btree_gist/sql/timestamp.sql
+++ b/contrib/btree_gist/sql/timestamp.sql
@@ -18,11 +18,7 @@ SELECT count(*) FROM timestamptmp WHERE a > '2004-10-26 08:55:08';
SELECT a, a <-> '2004-10-26 08:55:08' FROM timestamptmp ORDER BY a <-> '2004-10-26 08:55:08' LIMIT 3;
-SET client_min_messages = DEBUG1;
CREATE INDEX timestampidx ON timestamptmp USING gist ( a );
-CREATE INDEX timestampidx_b ON timestamptmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX timestampidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/timestamptz.sql b/contrib/btree_gist/sql/timestamptz.sql
index 2a92f63fc4a..f70caa4a649 100644
--- a/contrib/btree_gist/sql/timestamptz.sql
+++ b/contrib/btree_gist/sql/timestamptz.sql
@@ -39,11 +39,7 @@ SELECT count(*) FROM timestamptztmp WHERE a > '2018-12-18 10:59:54 GMT+4';
SELECT a, a <-> '2018-12-18 10:59:54 GMT+2' FROM timestamptztmp ORDER BY a <-> '2018-12-18 10:59:54 GMT+2' LIMIT 3;
-SET client_min_messages = DEBUG1;
CREATE INDEX timestamptzidx ON timestamptztmp USING gist ( a );
-CREATE INDEX timestamptzidx_b ON timestamptztmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX timestamptzidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/timetz.sql b/contrib/btree_gist/sql/timetz.sql
index bc79d134b8f..2fb725db747 100644
--- a/contrib/btree_gist/sql/timetz.sql
+++ b/contrib/btree_gist/sql/timetz.sql
@@ -42,11 +42,7 @@ INSERT INTO timetzcmp (r_id,a) SELECT 25,count(*) FROM timetztmp WHERE a > '07:
-SET client_min_messages = DEBUG1;
CREATE INDEX timetzidx ON timetztmp USING gist ( a );
-CREATE INDEX timetzidx_b ON timetztmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX timetzidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/uuid.sql b/contrib/btree_gist/sql/uuid.sql
index 7771bc0d828..3f7ad764e2d 100644
--- a/contrib/btree_gist/sql/uuid.sql
+++ b/contrib/btree_gist/sql/uuid.sql
@@ -16,11 +16,7 @@ SELECT count(*) FROM uuidtmp WHERE a >= '55e65ca2-4136-4a4b-ba78-cd3fe4678203';
SELECT count(*) FROM uuidtmp WHERE a > '55e65ca2-4136-4a4b-ba78-cd3fe4678203';
-SET client_min_messages = DEBUG1;
CREATE INDEX uuididx ON uuidtmp USING gist ( a );
-CREATE INDEX uuididx_b ON uuidtmp USING gist ( a ) WITH (buffering=on);
-DROP INDEX uuididx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/varbit.sql b/contrib/btree_gist/sql/varbit.sql
index 6d8243572bf..e2a33b5a1b0 100644
--- a/contrib/btree_gist/sql/varbit.sql
+++ b/contrib/btree_gist/sql/varbit.sql
@@ -16,11 +16,7 @@ SELECT count(*) FROM varbittmp WHERE a >= '1110100111010';
SELECT count(*) FROM varbittmp WHERE a > '1110100111010';
-SET client_min_messages = DEBUG1;
CREATE INDEX varbitidx ON varbittmp USING GIST ( a );
-CREATE INDEX varbitidx_b ON varbittmp USING GIST ( a ) WITH (buffering=on);
-DROP INDEX varbitidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/contrib/btree_gist/sql/varchar.sql b/contrib/btree_gist/sql/varchar.sql
index 59b77e0983c..8087a17704e 100644
--- a/contrib/btree_gist/sql/varchar.sql
+++ b/contrib/btree_gist/sql/varchar.sql
@@ -16,11 +16,7 @@ SELECT count(*) FROM vchartmp WHERE a >= '31b0'::varchar(32);
SELECT count(*) FROM vchartmp WHERE a > '31b0'::varchar(32);
-SET client_min_messages = DEBUG1;
CREATE INDEX vcharidx ON vchartmp USING GIST ( text(a) );
-CREATE INDEX vcharidx_b ON vchartmp USING GIST ( text(a) ) WITH (buffering=on);
-DROP INDEX vcharidx_b;
-RESET client_min_messages;
SET enable_seqscan=off;
diff --git a/src/backend/access/gist/gistbuild.c b/src/backend/access/gist/gistbuild.c
index a90e3de3326..1054f6f1f2e 100644
--- a/src/backend/access/gist/gistbuild.c
+++ b/src/backend/access/gist/gistbuild.c
@@ -260,7 +260,6 @@ gistbuild(Relation heap, Relation index, IndexInfo *indexInfo)
/*
* Sort all data, build the index from bottom up.
*/
- elog(DEBUG1, "using sorted GiST build");
buildstate.sortstate = tuplesort_begin_index_gist(heap,
index,
maintenance_work_mem,