summaryrefslogtreecommitdiff
path: root/src/backend/commands/tablecmds.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2014-07-14 17:24:40 -0400
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2014-07-14 17:24:40 -0400
commit346d7be184a617ca9f64bdf5c25fd6bcd5231293 (patch)
treed9ee36a6ed98803ef671a83caca4243b93268204 /src/backend/commands/tablecmds.c
parent0ffc201a51395ca71fe429ef86c872850a5850ee (diff)
Move view reloptions into their own varlena struct
Per discussion after a gripe from me in http://www.postgresql.org/message-id/20140611194633.GH18688@eldon.alvh.no-ip.org Jaime Casanova
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r--src/backend/commands/tablecmds.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 60d387a5e6c..5dc4d18b6a5 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -533,7 +533,10 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId)
reloptions = transformRelOptions((Datum) 0, stmt->options, NULL, validnsps,
true, false);
- (void) heap_reloptions(relkind, reloptions, true);
+ if (relkind == RELKIND_VIEW)
+ (void) view_reloptions(reloptions, true);
+ else
+ (void) heap_reloptions(relkind, reloptions, true);
if (stmt->ofTypename)
{
@@ -8889,10 +8892,12 @@ ATExecSetRelOptions(Relation rel, List *defList, AlterTableType operation,
{
case RELKIND_RELATION:
case RELKIND_TOASTVALUE:
- case RELKIND_VIEW:
case RELKIND_MATVIEW:
(void) heap_reloptions(rel->rd_rel->relkind, newOptions, true);
break;
+ case RELKIND_VIEW:
+ (void) view_reloptions(newOptions, true);
+ break;
case RELKIND_INDEX:
(void) index_reloptions(rel->rd_am->amoptions, newOptions, true);
break;