aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/tablecmds.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2021-03-22 09:21:37 -0400
committerRobert Haas <rhaas@postgresql.org>2021-03-22 09:21:37 -0400
commit226e2be3876d0bda3dc33d16dfa0bed246b7b74f (patch)
tree28b57618b09843c4f55e4d57ea80f287414f28aa /src/backend/commands/tablecmds.c
parent909b449e00fc2f71e1a38569bbddbb6457d28485 (diff)
downloadpostgresql-226e2be3876d0bda3dc33d16dfa0bed246b7b74f.tar.gz
postgresql-226e2be3876d0bda3dc33d16dfa0bed246b7b74f.zip
More code cleanup for configurable TOAST compression.
Remove unused macro. Fix confusion about whether a TOAST compression method is identified by an OID or a char. Justin Pryzby Discussion: http://postgr.es/m/20210321235544.GD4203@telsasoft.com
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r--src/backend/commands/tablecmds.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 877c08814e0..22f3c5efc09 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -7847,6 +7847,7 @@ SetIndexStorageProperties(Relation rel, Relation attrelation,
index_close(indrel, lockmode);
}
}
+
/*
* ALTER TABLE ALTER COLUMN SET STORAGE
*
@@ -15070,7 +15071,7 @@ ATExecSetCompression(AlteredTableInfo *tab,
AttrNumber attnum;
char *compression;
char typstorage;
- Oid cmoid;
+ char cmethod;
ObjectAddress address;
Assert(IsA(newValue, String));
@@ -15104,10 +15105,10 @@ ATExecSetCompression(AlteredTableInfo *tab,
format_type_be(atttableform->atttypid))));
/* get the attribute compression method. */
- cmoid = GetAttributeCompression(atttableform, compression);
+ cmethod = GetAttributeCompression(atttableform, compression);
/* update pg_attribute entry */
- atttableform->attcompression = cmoid;
+ atttableform->attcompression = cmethod;
CatalogTupleUpdate(attrel, &tuple->t_self, tuple);
InvokeObjectPostAlterHook(RelationRelationId,
@@ -15118,7 +15119,7 @@ ATExecSetCompression(AlteredTableInfo *tab,
* Apply the change to indexes as well (only for simple index columns,
* matching behavior of index.c ConstructTupleDescriptor()).
*/
- SetIndexStorageProperties(rel, attrel, attnum, cmoid, '\0', lockmode);
+ SetIndexStorageProperties(rel, attrel, attnum, cmethod, '\0', lockmode);
heap_freetuple(tuple);