Fix segmentation fault and add some spaces
This commit is contained in:
parent
01bc0111f7
commit
60e6a358b5
2 changed files with 16 additions and 9 deletions
|
|
@ -262,7 +262,11 @@ ExecCreateImmv(ParseState *pstate, CreateTableAsStmt *stmt,
|
|||
/* Create an index on incremental maintainable materialized view, if possible */
|
||||
CreateIndexOnIMMV(viewQuery, matviewRel, true);
|
||||
|
||||
/* Create triggers on incremental maintainable materialized view */
|
||||
/*
|
||||
* Create triggers on incremental maintainable materialized view
|
||||
* This argument should use 'query'. This needs to use a rewritten query,
|
||||
* because a sublink in jointree is not supported by this function.
|
||||
*/
|
||||
CreateIvmTriggersOnBaseTables(query, matviewOid, true);
|
||||
|
||||
/* Create triggers to prevent IMMV from beeing changed */
|
||||
|
|
|
|||
|
|
@ -1601,10 +1601,13 @@ rewrite_exists_subquery_walker(Query *query, Node *node, int *count)
|
|||
|
||||
/* get subquery in WHERE clause */
|
||||
fromexpr = (FromExpr *) query->jointree;
|
||||
if (fromexpr->quals != NULL)
|
||||
{
|
||||
query = rewrite_exists_subquery_walker(query, fromexpr->quals, count);
|
||||
/* drop subquery in WHERE clause */
|
||||
if (IsA(fromexpr->quals, SubLink))
|
||||
fromexpr->quals = NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case T_BoolExpr:
|
||||
|
|
|
|||
Loading…
Reference in a new issue