aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/adt/jsonb.c')
-rw-r--r--src/backend/utils/adt/jsonb.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/backend/utils/adt/jsonb.c b/src/backend/utils/adt/jsonb.c
index 6940b11c290..0ae9d7b9c54 100644
--- a/src/backend/utils/adt/jsonb.c
+++ b/src/backend/utils/adt/jsonb.c
@@ -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