1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-15 05:46:52 +03:00

Add is_create parameter to RefreshMatviewByOid().

RefreshMatviewByOid is used for both REFRESH and CREATE MATERIALIZED
VIEW.  This flag is currently just used for handling internal error
messages, but also aimed to improve code-readability.

Author: Yugo Nagata
Discussion: https://postgr.es/m/20240726122630.70e889f63a4d7e26f8549de8@sraoss.co.jp
This commit is contained in:
Jeff Davis
2024-07-31 16:42:19 -07:00
parent f683d3a4ca
commit ca2eea3ac8
3 changed files with 34 additions and 18 deletions

View File

@@ -346,11 +346,8 @@ ExecCreateTableAs(ParseState *pstate, CreateTableAsStmt *stmt,
*/
if (do_refresh)
{
RefreshMatViewByOid(address.objectId, false, false,
RefreshMatViewByOid(address.objectId, true, false, false,
pstate->p_sourcetext, qc);
if (qc)
qc->commandTag = CMDTAG_SELECT;
}
return address;