aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonfuncs.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2016-06-09 18:02:36 -0400
committerRobert Haas <rhaas@postgresql.org>2016-06-09 18:02:36 -0400
commit4bc424b968058c7f0aa685821d7039e86faac99c (patch)
treea4e245ae67bd11edb3926ff5fb3b0223438ac283 /src/backend/utils/adt/jsonfuncs.c
parent9164deea2f4ac90ee5e008ff41fc5ad4423887b2 (diff)
downloadpostgresql-4bc424b968058c7f0aa685821d7039e86faac99c.tar.gz
postgresql-4bc424b968058c7f0aa685821d7039e86faac99c.zip
pgindent run for 9.6
Diffstat (limited to 'src/backend/utils/adt/jsonfuncs.c')
-rw-r--r--src/backend/utils/adt/jsonfuncs.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c
index fb149dcd477..cb14993542d 100644
--- a/src/backend/utils/adt/jsonfuncs.c
+++ b/src/backend/utils/adt/jsonfuncs.c
@@ -609,7 +609,7 @@ jsonb_array_element(PG_FUNCTION_ARGS)
/* Handle negative subscript */
if (element < 0)
{
- uint32 nelements = JB_ROOT_COUNT(jb);
+ uint32 nelements = JB_ROOT_COUNT(jb);
if (-element > nelements)
PG_RETURN_NULL();
@@ -652,7 +652,7 @@ jsonb_array_element_text(PG_FUNCTION_ARGS)
/* Handle negative subscript */
if (element < 0)
{
- uint32 nelements = JB_ROOT_COUNT(jb);
+ uint32 nelements = JB_ROOT_COUNT(jb);
if (-element > nelements)
PG_RETURN_NULL();
@@ -992,7 +992,7 @@ get_array_start(void *state)
_state->path_indexes[lex_level] != INT_MIN)
{
/* Negative subscript -- convert to positive-wise subscript */
- int nelements = json_count_array_elements(_state->lex);
+ int nelements = json_count_array_elements(_state->lex);
if (-_state->path_indexes[lex_level] <= nelements)
_state->path_indexes[lex_level] += nelements;
@@ -1002,8 +1002,8 @@ get_array_start(void *state)
{
/*
* Special case: we should match the entire array. We only need this
- * at the outermost level because at nested levels the match will
- * have been started by the outer field or array element callback.
+ * at the outermost level because at nested levels the match will have
+ * been started by the outer field or array element callback.
*/
_state->result_start = _state->lex->token_start;
}
@@ -3368,9 +3368,9 @@ jsonb_concat(PG_FUNCTION_ARGS)
*it2;
/*
- * If one of the jsonb is empty, just return the other if it's not
- * scalar and both are of the same kind. If it's a scalar or they are
- * of different kinds we need to perform the concatenation even if one is
+ * If one of the jsonb is empty, just return the other if it's not scalar
+ * and both are of the same kind. If it's a scalar or they are of
+ * different kinds we need to perform the concatenation even if one is
* empty.
*/
if (JB_ROOT_IS_OBJECT(jb1) == JB_ROOT_IS_OBJECT(jb2))
@@ -3481,7 +3481,7 @@ jsonb_delete_idx(PG_FUNCTION_ARGS)
it = JsonbIteratorInit(&in->root);
r = JsonbIteratorNext(&it, &v, false);
- Assert (r == WJB_BEGIN_ARRAY);
+ Assert(r == WJB_BEGIN_ARRAY);
n = v.val.array.nElems;
if (idx < 0)
@@ -3868,8 +3868,8 @@ setPathObject(JsonbIterator **it, Datum *path_elems, bool *path_nulls,
if (level == path_len - 1)
{
/*
- * called from jsonb_insert(), it forbids redefining
- * an existsing value
+ * called from jsonb_insert(), it forbids redefining an
+ * existsing value
*/
if (op_type & (JB_PATH_INSERT_BEFORE | JB_PATH_INSERT_AFTER))
ereport(ERROR,
@@ -3878,7 +3878,7 @@ setPathObject(JsonbIterator **it, Datum *path_elems, bool *path_nulls,
errhint("Try using the function jsonb_set "
"to replace key value.")));
- r = JsonbIteratorNext(it, &v, true); /* skip value */
+ r = JsonbIteratorNext(it, &v, true); /* skip value */
if (!(op_type & JB_PATH_DELETE))
{
(void) pushJsonbValue(st, WJB_KEY, &k);
@@ -4005,8 +4005,8 @@ setPathArray(JsonbIterator **it, Datum *path_elems, bool *path_nulls,
/*
* We should keep current value only in case of
- * JB_PATH_INSERT_BEFORE or JB_PATH_INSERT_AFTER
- * because otherwise it should be deleted or replaced
+ * JB_PATH_INSERT_BEFORE or JB_PATH_INSERT_AFTER because
+ * otherwise it should be deleted or replaced
*/
if (op_type & (JB_PATH_INSERT_AFTER | JB_PATH_INSERT_BEFORE))
(void) pushJsonbValue(st, r, &v);