mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
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
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user