From d1cacda2a032755a6fdef14f6efc566def4e47be Mon Sep 17 00:00:00 2001 From: yuzupy Date: Thu, 22 Nov 2018 15:15:21 +0900 Subject: [PATCH] Fix expanding childrel order for pg10 --- hypopg_table.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hypopg_table.c b/hypopg_table.c index 4ab413b..e6df890 100644 --- a/hypopg_table.c +++ b/hypopg_table.c @@ -632,8 +632,10 @@ hypo_generate_partitiondesc(hypoTable *parent) i++; } +#if PG_VERSION_NUM >= 110000 qsort_arg(all_values, ndatums, sizeof(PartitionListValue *), qsort_partition_list_value_cmp, (void *) key); +#endif } else if (key->strategy == PARTITION_STRATEGY_RANGE) { @@ -691,11 +693,13 @@ hypo_generate_partitiondesc(hypoTable *parent) Assert(ndatums == nparts * 2 || (default_index != -1 && ndatums == (nparts - 1) * 2)); +#if PG_VERSION_NUM >= 110000 /* Sort all the bounds in ascending order */ qsort_arg(all_bounds, ndatums, sizeof(PartitionRangeBound *), qsort_partition_rbound_cmp, (void *) key); +#endif /* Save distinct bounds from all_bounds into rbounds. */ rbounds = (PartitionRangeBound **)