Fix error codes for invalid input to create_immv
This commit is contained in:
parent
279b14049e
commit
1c4408199c
1 changed files with 3 additions and 3 deletions
6
pg_ivm.c
6
pg_ivm.c
|
|
@ -130,12 +130,12 @@ parseNameAndColumns(const char *string, List **names, List **colNames)
|
||||||
|
|
||||||
if (!SplitIdentifierString(ptr, ',', &cols))
|
if (!SplitIdentifierString(ptr, ',', &cols))
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
|
(errcode(ERRCODE_INVALID_NAME),
|
||||||
errmsg("invalid syntax name")));
|
errmsg("invalid name syntax")));
|
||||||
|
|
||||||
if (list_length(cols) == 0)
|
if (list_length(cols) == 0)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
|
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
||||||
errmsg("must specify at least one column name")));
|
errmsg("must specify at least one column name")));
|
||||||
|
|
||||||
foreach(lc, cols)
|
foreach(lc, cols)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue