Updated invalid input syntax messages to be consistent [skip ci]

This commit is contained in:
Andrew Kane
2024-04-13 11:32:47 -07:00
parent f627e69c5f
commit c5c82bafda
6 changed files with 32 additions and 32 deletions

View File

@@ -169,7 +169,7 @@ halfvec_in(PG_FUNCTION_ARGS)
if (*str != '[')
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("malformed halfvec literal: \"%s\"", lit),
errmsg("invalid input syntax for type halfvec: \"%s\"", lit),
errdetail("Vector contents must start with \"[\".")));
str++;
@@ -231,7 +231,7 @@ halfvec_in(PG_FUNCTION_ARGS)
if (stringEnd == NULL || *stringEnd != ']')
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("malformed halfvec literal: \"%s\"", lit),
errmsg("invalid input syntax for type halfvec: \"%s\"", lit),
errdetail("Unexpected end of input.")));
stringEnd++;
@@ -243,7 +243,7 @@ halfvec_in(PG_FUNCTION_ARGS)
if (*stringEnd != '\0')
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("malformed halfvec literal: \"%s\"", lit),
errmsg("invalid input syntax for type halfvec: \"%s\"", lit),
errdetail("Junk after closing right brace.")));
/* Ensure no consecutive delimiters since strtok skips */
@@ -252,7 +252,7 @@ halfvec_in(PG_FUNCTION_ARGS)
if (pt[-1] == ',' && *pt == ',')
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("malformed halfvec literal: \"%s\"", lit)));
errmsg("invalid input syntax for type halfvec: \"%s\"", lit)));
}
if (dim < 1)