diff options
author | Kevin Grittner <kgrittn@postgresql.org> | 2013-11-02 18:31:41 -0500 |
---|---|---|
committer | Kevin Grittner <kgrittn@postgresql.org> | 2013-11-02 18:31:41 -0500 |
commit | b2cd72cbbdd2a1b657d7dc874fcc9f1c1d83d8e3 (patch) | |
tree | d789ecce6c9d2b3d4a2a8af4b7c6f1e4614179bf /src/backend/executor | |
parent | 86dab9c8addd2898abc0feddc4e7f1ef0cd786f4 (diff) |
Fix subquery reference to non-populated MV in CMV.
A subquery reference to a matview should be allowed by CREATE
MATERIALIZED VIEW WITH NO DATA, just like a direct reference is.
Per bug report from Laurent Sartran.
Backpatch to 9.3.
Diffstat (limited to 'src/backend/executor')
-rw-r--r-- | src/backend/executor/execMain.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index ee228b6dee8..fe0321ea06a 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -864,7 +864,8 @@ InitPlan(QueryDesc *queryDesc, int eflags) * it is a parameterless subplan (not initplan), we suggest that it be * prepared to handle REWIND efficiently; otherwise there is no need. */ - sp_eflags = eflags & EXEC_FLAG_EXPLAIN_ONLY; + sp_eflags = eflags + & (EXEC_FLAG_EXPLAIN_ONLY | EXEC_FLAG_WITH_NO_DATA); if (bms_is_member(i, plannedstmt->rewindPlanIDs)) sp_eflags |= EXEC_FLAG_REWIND; |