提交 0c3bfb4a 编写于 作者: D Daniel Gustafsson

Fix error message style and typo in exttab am code

Align a few error messages to match upstream coding convention for
error messages (which we are slowly adapting to), and fix a typo.
Spotted while fixing other things in the file.
Reviewed-by: NVenkatesh Raghavan <vraghavan@pivotal.io>
上级 1ebabec8
......@@ -836,7 +836,7 @@ else \
pstate->cdbsreh->processed++; \
pstate->cdbsreh->consec_csv_err = pstate->num_consec_csv_err; \
\
/* set the error message. Use original msg and add column name if availble */ \
/* set the error message. Use original msg and add column name if available */ \
if (pstate->cur_attname)\
{\
pstate->cdbsreh->errmsg = psprintf("%s, column %s", \
......@@ -2102,13 +2102,14 @@ parseCopyFormatString(char *fmtstr, char fmttype)
error:
if (token)
ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR),
errmsg("external table internal parse error at \"%s\"",
token)));
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
errmsg("external table internal parse error at \"%s\"",
token)));
else
ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR),
errmsg("external table internal parse error at end of "
"line")));
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
errmsg("external table internal parse error at end of line")));
}
static void
......@@ -2165,9 +2166,9 @@ parseCustomFormatString(char *fmtstr, char **formatter_name, List **formatter_pa
}
if (!formatter_found)
ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR),
errmsg("external table internal parse error: "
"no formatter function name found")));
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
errmsg("external table internal parse error: no formatter function name found")));
*formatter_params = l;
......@@ -2175,13 +2176,14 @@ parseCustomFormatString(char *fmtstr, char **formatter_name, List **formatter_pa
error:
if (token)
ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR),
errmsg("external table internal parse error at \"%s\"",
token)));
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
errmsg("external table internal parse error at \"%s\"",
token)));
else
ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR),
errmsg("external table internal parse error at end of "
"line")));
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
errmsg("external table internal parse error at end of line")));
}
static char *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册