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