aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/common/indextuple.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/common/indextuple.c')
-rw-r--r--src/backend/access/common/indextuple.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/backend/access/common/indextuple.c b/src/backend/access/common/indextuple.c
index 52125604113..8df882da7a7 100644
--- a/src/backend/access/common/indextuple.c
+++ b/src/backend/access/common/indextuple.c
@@ -104,18 +104,9 @@ index_form_tuple(TupleDesc tupleDescriptor,
att->attstorage == TYPSTORAGE_MAIN))
{
Datum cvalue;
- char compression = att->attcompression;
- /*
- * If the compression method is not valid, use the default. We
- * don't expect this to happen for regular index columns, which
- * inherit the setting from the corresponding table column, but we
- * do expect it to happen whenever an expression is indexed.
- */
- if (!CompressionMethodIsValid(compression))
- compression = GetDefaultToastCompression();
-
- cvalue = toast_compress_datum(untoasted_values[i], compression);
+ cvalue = toast_compress_datum(untoasted_values[i],
+ att->attcompression);
if (DatumGetPointer(cvalue) != NULL)
{