diff options
author | Álvaro Herrera | 2025-03-14 08:28:51 +0000 |
---|---|---|
committer | Álvaro Herrera | 2025-03-14 08:28:51 +0000 |
commit | 1548c3a30436dd825cfbf57923c6766b2fddd355 (patch) | |
tree | 5f16b75f88f5c4cc868f50841d59d0c5990337b3 /src/backend/commands | |
parent | 92fc6856cb4c598f99c58b862bc34aebc6f2ec25 (diff) |
Remove direct handling of reloptions for toast tables
It doesn't actually work, even with allow_system_table_mods turned on:
the ALTER TABLE operation is rejected by ATSimplePermissions(), so even
the error message we're adding in this commit is unreachable.
Add a test case for it.
Author: Nikolay Shaplov <[email protected]>
Discussion: https://postgr.es/m/1913854.tdWV9SEqCh@thinkpad-pgpro
Diffstat (limited to 'src/backend/commands')
-rw-r--r-- | src/backend/commands/tablecmds.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index d3edd879654..129c97fdf28 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -15963,7 +15963,6 @@ ATExecSetRelOptions(Relation rel, List *defList, AlterTableType operation, switch (rel->rd_rel->relkind) { case RELKIND_RELATION: - case RELKIND_TOASTVALUE: case RELKIND_MATVIEW: (void) heap_reloptions(rel->rd_rel->relkind, newOptions, true); break; @@ -15977,6 +15976,8 @@ ATExecSetRelOptions(Relation rel, List *defList, AlterTableType operation, case RELKIND_PARTITIONED_INDEX: (void) index_reloptions(rel->rd_indam->amoptions, newOptions, true); break; + case RELKIND_TOASTVALUE: + /* fall through to error -- shouldn't ever get here */ default: ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), |