Fix to use ereport func instead of elog func
This commit is contained in:
parent
9ac5a2c42e
commit
9d51897aaa
1 changed files with 3 additions and 1 deletions
4
pg_ivm.c
4
pg_ivm.c
|
|
@ -199,7 +199,9 @@ create_immv(PG_FUNCTION_ARGS)
|
||||||
|
|
||||||
/* view definition should spcify SELECT query */
|
/* view definition should spcify SELECT query */
|
||||||
if (!IsA(parsetree->stmt, SelectStmt))
|
if (!IsA(parsetree->stmt, SelectStmt))
|
||||||
elog(ERROR, "view definition must specify SELECT statement");
|
ereport(ERROR,
|
||||||
|
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||||
|
errmsg("view definition must specify SELECT statement")));
|
||||||
|
|
||||||
ctas = makeNode(CreateTableAsStmt);
|
ctas = makeNode(CreateTableAsStmt);
|
||||||
ctas->query = parsetree->stmt;
|
ctas->query = parsetree->stmt;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue