1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

pgindent run prior to branching

This commit is contained in:
Andrew Dunstan
2018-06-30 12:25:49 -04:00
parent 2c64d20048
commit 1e9c858090
18 changed files with 62 additions and 62 deletions

View File

@ -1902,29 +1902,29 @@ cannotCastJsonbValue(enum jbvType type, const char *sqltype)
{
static const struct
{
enum jbvType type;
const char *msg;
enum jbvType type;
const char *msg;
}
messages[] =
messages[] =
{
{ jbvNull, gettext_noop("cannot cast jsonb null to type %s") },
{ jbvString, gettext_noop("cannot cast jsonb string to type %s") },
{ jbvNumeric, gettext_noop("cannot cast jsonb numeric to type %s") },
{ jbvBool, gettext_noop("cannot cast jsonb boolean to type %s") },
{ jbvArray, gettext_noop("cannot cast jsonb array to type %s") },
{ jbvObject, gettext_noop("cannot cast jsonb object to type %s") },
{ jbvBinary, gettext_noop("cannot cast jsonb array or object to type %s") }
{jbvNull, gettext_noop("cannot cast jsonb null to type %s")},
{jbvString, gettext_noop("cannot cast jsonb string to type %s")},
{jbvNumeric, gettext_noop("cannot cast jsonb numeric to type %s")},
{jbvBool, gettext_noop("cannot cast jsonb boolean to type %s")},
{jbvArray, gettext_noop("cannot cast jsonb array to type %s")},
{jbvObject, gettext_noop("cannot cast jsonb object to type %s")},
{jbvBinary, gettext_noop("cannot cast jsonb array or object to type %s")}
};
int i;
int i;
for(i=0; i<lengthof(messages); i++)
for (i = 0; i < lengthof(messages); i++)
if (messages[i].type == type)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg(messages[i].msg, sqltype)));
/* should be unreachable */
elog(ERROR, "unknown jsonb type: %d", (int)type);
elog(ERROR, "unknown jsonb type: %d", (int) type);
}
Datum