diff options
author | Kevin Grittner <kgrittn@postgresql.org> | 2013-03-22 13:27:34 -0500 |
---|---|---|
committer | Kevin Grittner <kgrittn@postgresql.org> | 2013-03-22 13:27:34 -0500 |
commit | 549dae0352a06a43ec664dc158556e12ec2d30e5 (patch) | |
tree | 603071d01487f6b6a8185b5475e63cf3e82b9981 /src/backend/commands/createas.c | |
parent | 4912385b56afe68ef76e47d38df1d61ada0fde2f (diff) | |
download | postgresql-549dae0352a06a43ec664dc158556e12ec2d30e5.tar.gz |
Fix problems with incomplete attempt to prohibit OIDS with MVs.
Problem with assertion failure in restoring from pg_dump output
reported by Joachim Wieland.
Review and suggestions by Tom Lane and Robert Haas.
Diffstat (limited to 'src/backend/commands/createas.c')
-rw-r--r-- | src/backend/commands/createas.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/commands/createas.c b/src/backend/commands/createas.c index a3ff1d56c8..06bbae5cc5 100644 --- a/src/backend/commands/createas.c +++ b/src/backend/commands/createas.c @@ -218,11 +218,15 @@ GetIntoRelEFlags(IntoClause *intoClause) * because it doesn't have enough information to do so itself (since we * can't build the target relation until after ExecutorStart). */ - if (interpretOidsOption(intoClause->options)) + if (interpretOidsOption(intoClause->options, intoClause->relkind)) flags = EXEC_FLAG_WITH_OIDS; else flags = EXEC_FLAG_WITHOUT_OIDS; + Assert(intoClause->relkind != RELKIND_MATVIEW || + (flags & (EXEC_FLAG_WITH_OIDS | EXEC_FLAG_WITHOUT_OIDS)) == + EXEC_FLAG_WITHOUT_OIDS); + if (intoClause->skipData) flags |= EXEC_FLAG_WITH_NO_DATA; |