diff options
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 02a7c04fdb7..7a13b971649 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -2030,14 +2030,14 @@ storage_name(char c) { switch (c) { - case 'p': + case TYPSTORAGE_PLAIN: return "PLAIN"; - case 'm': - return "MAIN"; - case 'x': - return "EXTENDED"; - case 'e': + case TYPSTORAGE_EXTERNAL: return "EXTERNAL"; + case TYPSTORAGE_EXTENDED: + return "EXTENDED"; + case TYPSTORAGE_MAIN: + return "MAIN"; default: return "???"; } @@ -7388,13 +7388,13 @@ ATExecSetStorage(Relation rel, const char *colName, Node *newValue, LOCKMODE loc storagemode = strVal(newValue); if (pg_strcasecmp(storagemode, "plain") == 0) - newstorage = 'p'; + newstorage = TYPSTORAGE_PLAIN; else if (pg_strcasecmp(storagemode, "external") == 0) - newstorage = 'e'; + newstorage = TYPSTORAGE_EXTERNAL; else if (pg_strcasecmp(storagemode, "extended") == 0) - newstorage = 'x'; + newstorage = TYPSTORAGE_EXTENDED; else if (pg_strcasecmp(storagemode, "main") == 0) - newstorage = 'm'; + newstorage = TYPSTORAGE_MAIN; else { ereport(ERROR, @@ -7426,7 +7426,7 @@ ATExecSetStorage(Relation rel, const char *colName, Node *newValue, LOCKMODE loc * safety check: do not allow toasted storage modes unless column datatype * is TOAST-aware. */ - if (newstorage == 'p' || TypeIsToastable(attrtuple->atttypid)) + if (newstorage == TYPSTORAGE_PLAIN || TypeIsToastable(attrtuple->atttypid)) attrtuple->attstorage = newstorage; else ereport(ERROR, |