Fix to use ereport func instead of elog func

This commit is contained in:
Takuma Hoshiai 2022-12-15 17:26:55 +09:00
parent 9ac5a2c42e
commit 9d51897aaa

View file

@ -199,7 +199,9 @@ create_immv(PG_FUNCTION_ARGS)
/* view definition should spcify SELECT query */
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->query = parsetree->stmt;