WITH FUNCTION hstore_to_json(hstore);
CREATE CAST (hstore AS jsonb)
- WITHOUT FUNCTION AS IMPLICIT;
+ WITHOUT FUNCTION AS IMPLICIT;
CREATE CAST (jsonb AS hstore)
- WITHOUT FUNCTION AS IMPLICIT;
+ WITHOUT FUNCTION AS IMPLICIT;
CREATE FUNCTION hstore_to_json_loose(hstore)
RETURNS json
PG_RETURN_POINTER(hstoreDump(NULL));
/* see discussion in arrayToHStoreSortedArray() */
- if (ArrayGetNItems(ARR_NDIM(array), ARR_DIMS(array)) >
+ if (ArrayGetNItems(ARR_NDIM(array), ARR_DIMS(array)) >
MaxAllocSize / sizeof(HStorePair))
ereport(ERROR,
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
errmsg("number of elements (%d) exceeds the maximum allowed (%d)",
- ArrayGetNItems(ARR_NDIM(array), ARR_DIMS(array)),
+ ArrayGetNItems(ARR_NDIM(array), ARR_DIMS(array)),
(int) (MaxAllocSize / sizeof(HStorePair)))));
switch(ARR_ELEMTYPE(array))
{
elog(ERROR,"Unsupported jsonb version number %d",version);
}
-
- return deserialize_json_text(result);
+
+ return deserialize_json_text(result);
}
Jsonb *jb = PG_GETARG_JSONB(0);
StringInfoData buf;
char *out;
- int version = 1;
+ int version = 1;
out = JsonbToCString(NULL, (JB_ISEMPTY(jb)) ? NULL : VARDATA(jb), VARSIZE(jb));
pq_begintypsend(&buf);
- pq_sendint(&buf, version, 1);
+ pq_sendint(&buf, version, 1);
pq_sendtext(&buf, out, strlen(out));
PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
}
#define JENTRY_ISFALSE JENTRY_ISBOOL
#define JENTRY_ISTRUE (0x10000000 | 0x20000000 | 0x40000000)
-/*
- * JENTRY_ISOBJECT, JENTRY_ISARRAY and JENTRY_ISSCALAR are only used in
+/*
+ * JENTRY_ISOBJECT, JENTRY_ISARRAY and JENTRY_ISSCALAR are only used in
* hstore send/recv. They are defined here because so are all the other
* JENTRY_IS* constants.
*/