PostgreSQL Source Code git master
Functions
json.h File Reference
#include "lib/stringinfo.h"
Include dependency graph for json.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void  escape_json (StringInfo buf, const char *str)
 
void  escape_json_with_len (StringInfo buf, const char *str, int len)
 
void  escape_json_text (StringInfo buf, const text *txt)
 
char *  JsonEncodeDateTime (char *buf, Datum value, Oid typid, const int *tzp)
 
bool  to_json_is_immutable (Oid typoid)
 
Datum  json_build_object_worker (int nargs, const Datum *args, const bool *nulls, const Oid *types, bool absent_on_null, bool unique_keys)
 
Datum  json_build_array_worker (int nargs, const Datum *args, const bool *nulls, const Oid *types, bool absent_on_null)
 
bool  json_validate (text *json, bool check_unique_keys, bool throw_error)
 

Function Documentation

escape_json()

void escape_json ( StringInfo  buf,
const char *  str 
)

Definition at line 1603 of file json.c.

1604{
1606
1607 for (; *str != '0円'; str++)
1609
1611}
const char * str
static pg_attribute_always_inline void escape_json_char(StringInfo buf, char c)
Definition: json.c:1563
static char * buf
Definition: pg_test_fsync.c:72
#define appendStringInfoCharMacro(str, ch)
Definition: stringinfo.h:231

References appendStringInfoCharMacro, buf, escape_json_char(), and str.

Referenced by appendJSONKeyValue(), composite_to_json(), datum_to_json_internal(), escape_yaml(), ExplainDummyGroup(), ExplainOpenGroup(), ExplainProperty(), ExplainPropertyList(), ExplainPropertyListNested(), generate_error_response(), populate_scalar(), sn_object_field_start(), sn_scalar(), transform_string_values_object_field_start(), transformJsonTableColumn(), and write_jsonlog().

escape_json_text()

void escape_json_text ( StringInfo  buf,
const texttxt 
)

Definition at line 1737 of file json.c.

1738{
1739 /* must cast away the const, unfortunately */
1740 text *tunpacked = pg_detoast_datum_packed(unconstify(text *, txt));
1741 int len = VARSIZE_ANY_EXHDR(tunpacked);
1742 char *str;
1743
1744 str = VARDATA_ANY(tunpacked);
1745
1747
1748 /* pfree any detoasted values */
1749 if (tunpacked != txt)
1750 pfree(tunpacked);
1751}
#define unconstify(underlying_type, expr)
Definition: c.h:1244
struct varlena * pg_detoast_datum_packed(struct varlena *datum)
Definition: fmgr.c:1829
void escape_json_with_len(StringInfo buf, const char *str, int len)
Definition: json.c:1632
void pfree(void *pointer)
Definition: mcxt.c:1594
const void size_t len
Definition: c.h:692
static Size VARSIZE_ANY_EXHDR(const void *PTR)
Definition: varatt.h:472
static char * VARDATA_ANY(const void *PTR)
Definition: varatt.h:486

References buf, escape_json_with_len(), len, pfree(), pg_detoast_datum_packed(), str, unconstify, VARDATA_ANY(), and VARSIZE_ANY_EXHDR().

Referenced by datum_to_json_internal(), json_object(), json_object_two_arg(), and transform_string_values_scalar().

escape_json_with_len()

void escape_json_with_len ( StringInfo  buf,
const char *  str,
int  len 
)

Definition at line 1632 of file json.c.

1633{
1634 int vlen;
1635
1636 Assert(len >= 0);
1637
1638 /*
1639 * Since we know the minimum length we'll need to append, let's just
1640 * enlarge the buffer now rather than incrementally making more space when
1641 * we run out. Add two extra bytes for the enclosing quotes.
1642 */
1644
1645 /*
1646 * Figure out how many bytes to process using SIMD. Round 'len' down to
1647 * the previous multiple of sizeof(Vector8), assuming that's a power-of-2.
1648 */
1649 vlen = len & (int) (~(sizeof(Vector8) - 1));
1650
1652
1653 for (int i = 0, copypos = 0;;)
1654 {
1655 /*
1656 * To speed this up, try searching sizeof(Vector8) bytes at once for
1657 * special characters that we need to escape. When we find one, we
1658 * fall out of the Vector8 loop and copy the portion we've vector
1659 * searched and then we process sizeof(Vector8) bytes one byte at a
1660 * time. Once done, come back and try doing vector searching again.
1661 * We'll also process any remaining bytes at the tail end of the
1662 * string byte-by-byte. This optimization assumes that most chunks of
1663 * sizeof(Vector8) bytes won't contain any special characters.
1664 */
1665 for (; i < vlen; i += sizeof(Vector8))
1666 {
1667 Vector8 chunk;
1668
1669 vector8_load(&chunk, (const uint8 *) &str[i]);
1670
1671 /*
1672 * Break on anything less than ' ' or if we find a '"' or '\\'.
1673 * Those need special handling. That's done in the per-byte loop.
1674 */
1675 if (vector8_has_le(chunk, (unsigned char) 0x1F) ||
1676 vector8_has(chunk, (unsigned char) '"') ||
1677 vector8_has(chunk, (unsigned char) '\\'))
1678 break;
1679
1680#ifdef ESCAPE_JSON_FLUSH_AFTER
1681
1682 /*
1683 * Flush what's been checked so far out to the destination buffer
1684 * every so often to avoid having to re-read cachelines when
1685 * escaping large strings.
1686 */
1687 if (i - copypos >= ESCAPE_JSON_FLUSH_AFTER)
1688 {
1689 appendBinaryStringInfo(buf, &str[copypos], i - copypos);
1690 copypos = i;
1691 }
1692#endif
1693 }
1694
1695 /*
1696 * Write to the destination up to the point that we've vector searched
1697 * so far. Do this only when switching into per-byte mode rather than
1698 * once every sizeof(Vector8) bytes.
1699 */
1700 if (copypos < i)
1701 {
1702 appendBinaryStringInfo(buf, &str[copypos], i - copypos);
1703 copypos = i;
1704 }
1705
1706 /*
1707 * Per-byte loop for Vector8s containing special chars and for
1708 * processing the tail of the string.
1709 */
1710 for (int b = 0; b < sizeof(Vector8); b++)
1711 {
1712 /* check if we've finished */
1713 if (i == len)
1714 goto done;
1715
1716 Assert(i < len);
1717
1719 }
1720
1721 copypos = i;
1722 /* We're not done yet. Try the vector search again. */
1723 }
1724
1725done:
1727}
uint8_t uint8
Definition: c.h:536
Assert(PointerIsAligned(start, uint64))
b
int b
Definition: isn.c:74
i
int i
Definition: isn.c:77
#define ESCAPE_JSON_FLUSH_AFTER
Definition: json.c:1623
static bool vector8_has_le(const Vector8 v, const uint8 c)
Definition: simd.h:227
static void vector8_load(Vector8 *v, const uint8 *s)
Definition: simd.h:107
uint64 Vector8
Definition: simd.h:60
static bool vector8_has(const Vector8 v, const uint8 c)
Definition: simd.h:176
void enlargeStringInfo(StringInfo str, int needed)
Definition: stringinfo.c:337
void appendBinaryStringInfo(StringInfo str, const void *data, int datalen)
Definition: stringinfo.c:281

References appendBinaryStringInfo(), appendStringInfoCharMacro, Assert(), b, buf, enlargeStringInfo(), escape_json_char(), ESCAPE_JSON_FLUSH_AFTER, i, len, str, vector8_has(), vector8_has_le(), and vector8_load().

Referenced by AddFileToBackupManifest(), escape_json_text(), hstore_to_json(), hstore_to_json_loose(), jsonb_put_escaped_value(), populate_scalar(), and printJsonPathItem().

json_build_array_worker()

Datum json_build_array_worker ( int  nargs,
const Datumargs,
const bool *  nulls,
const Oidtypes,
bool  absent_on_null 
)

Definition at line 1345 of file json.c.

1347{
1348 int i;
1349 const char *sep = "";
1350 StringInfo result;
1351
1352 result = makeStringInfo();
1353
1354 appendStringInfoChar(result, '[');
1355
1356 for (i = 0; i < nargs; i++)
1357 {
1358 if (absent_on_null && nulls[i])
1359 continue;
1360
1361 appendStringInfoString(result, sep);
1362 sep = ", ";
1363 add_json(args[i], nulls[i], result, types[i], false);
1364 }
1365
1366 appendStringInfoChar(result, ']');
1367
1368 return PointerGetDatum(cstring_to_text_with_len(result->data, result->len));
1369}
struct typedefs * types
Definition: ecpg.c:30
static void add_json(Datum val, bool is_null, StringInfo result, Oid val_type, bool key_scalar)
Definition: json.c:603
static Datum PointerGetDatum(const void *X)
Definition: postgres.h:332
StringInfo makeStringInfo(void)
Definition: stringinfo.c:72
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:230
void appendStringInfoChar(StringInfo str, char ch)
Definition: stringinfo.c:242
char * data
Definition: stringinfo.h:48
text * cstring_to_text_with_len(const char *s, int len)
Definition: varlena.c:193

References add_json(), appendStringInfoChar(), appendStringInfoString(), generate_unaccent_rules::args, cstring_to_text_with_len(), StringInfoData::data, i, StringInfoData::len, makeStringInfo(), PointerGetDatum(), and types.

Referenced by ExecEvalJsonConstructor(), and json_build_array().

json_build_object_worker()

Datum json_build_object_worker ( int  nargs,
const Datumargs,
const bool *  nulls,
const Oidtypes,
bool  absent_on_null,
bool  unique_keys 
)

Definition at line 1225 of file json.c.

1227{
1228 int i;
1229 const char *sep = "";
1230 StringInfo result;
1231 JsonUniqueBuilderState unique_check;
1232
1233 if (nargs % 2 != 0)
1234 ereport(ERROR,
1235 (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1236 errmsg("argument list must have even number of elements"),
1237 /* translator: %s is a SQL function name */
1238 errhint("The arguments of %s must consist of alternating keys and values.",
1239 "json_build_object()")));
1240
1241 result = makeStringInfo();
1242
1243 appendStringInfoChar(result, '{');
1244
1245 if (unique_keys)
1246 json_unique_builder_init(&unique_check);
1247
1248 for (i = 0; i < nargs; i += 2)
1249 {
1250 StringInfo out;
1251 bool skip;
1252 int key_offset;
1253
1254 /* Skip null values if absent_on_null */
1255 skip = absent_on_null && nulls[i + 1];
1256
1257 if (skip)
1258 {
1259 /* If key uniqueness check is needed we must save skipped keys */
1260 if (!unique_keys)
1261 continue;
1262
1263 out = json_unique_builder_get_throwawaybuf(&unique_check);
1264 }
1265 else
1266 {
1267 appendStringInfoString(result, sep);
1268 sep = ", ";
1269 out = result;
1270 }
1271
1272 /* process key */
1273 if (nulls[i])
1274 ereport(ERROR,
1275 (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
1276 errmsg("null value not allowed for object key")));
1277
1278 /* save key offset before appending it */
1279 key_offset = out->len;
1280
1281 add_json(args[i], false, out, types[i], true);
1282
1283 if (unique_keys)
1284 {
1285 /*
1286 * check key uniqueness after key appending
1287 *
1288 * Copy the key first, instead of pointing into the buffer. It
1289 * will be added to the hash table, but the buffer may get
1290 * reallocated as we're appending more data to it. That would
1291 * invalidate pointers to keys in the current buffer.
1292 */
1293 const char *key = pstrdup(&out->data[key_offset]);
1294
1295 if (!json_unique_check_key(&unique_check.check, key, 0))
1296 ereport(ERROR,
1297 errcode(ERRCODE_DUPLICATE_JSON_OBJECT_KEY_VALUE),
1298 errmsg("duplicate JSON object key value: %s", key));
1299
1300 if (skip)
1301 continue;
1302 }
1303
1304 appendStringInfoString(result, " : ");
1305
1306 /* process value */
1307 add_json(args[i + 1], nulls[i + 1], result, types[i + 1], false);
1308 }
1309
1310 appendStringInfoChar(result, '}');
1311
1312 return PointerGetDatum(cstring_to_text_with_len(result->data, result->len));
1313}
int errhint(const char *fmt,...)
Definition: elog.c:1321
int errcode(int sqlerrcode)
Definition: elog.c:854
int errmsg(const char *fmt,...)
Definition: elog.c:1071
#define ERROR
Definition: elog.h:39
#define ereport(elevel,...)
Definition: elog.h:150
static StringInfo json_unique_builder_get_throwawaybuf(JsonUniqueBuilderState *cxt)
Definition: json.c:979
static bool json_unique_check_key(JsonUniqueCheckState *cxt, const char *key, int object_id)
Definition: json.c:959
static void json_unique_builder_init(JsonUniqueBuilderState *cxt)
Definition: json.c:951
char * pstrdup(const char *in)
Definition: mcxt.c:1759
static const struct exclude_list_item skip[]
Definition: pg_checksums.c:107
JsonUniqueCheckState check
Definition: json.c:72

References add_json(), appendStringInfoChar(), appendStringInfoString(), generate_unaccent_rules::args, JsonUniqueBuilderState::check, cstring_to_text_with_len(), StringInfoData::data, ereport, errcode(), errhint(), errmsg(), ERROR, i, json_unique_builder_get_throwawaybuf(), json_unique_builder_init(), json_unique_check_key(), sort-test::key, StringInfoData::len, makeStringInfo(), PointerGetDatum(), pstrdup(), skip, and types.

Referenced by ExecEvalJsonConstructor(), and json_build_object().

json_validate()

bool json_validate ( textjson,
bool  check_unique_keys,
bool  throw_error 
)

Definition at line 1813 of file json.c.

1814{
1815 JsonLexContext lex;
1816 JsonSemAction uniqueSemAction = {0};
1818 JsonParseErrorType result;
1819
1820 makeJsonLexContext(&lex, json, check_unique_keys);
1821
1822 if (check_unique_keys)
1823 {
1824 state.lex = &lex;
1825 state.stack = NULL;
1826 state.id_counter = 0;
1827 state.unique = true;
1829
1830 uniqueSemAction.semstate = &state;
1831 uniqueSemAction.object_start = json_unique_object_start;
1833 uniqueSemAction.object_end = json_unique_object_end;
1834 }
1835
1836 result = pg_parse_json(&lex, check_unique_keys ? &uniqueSemAction : &nullSemAction);
1837
1838 if (result != JSON_SUCCESS)
1839 {
1840 if (throw_error)
1841 json_errsave_error(result, &lex, NULL);
1842
1843 return false; /* invalid json */
1844 }
1845
1846 if (check_unique_keys && !state.unique)
1847 {
1848 if (throw_error)
1849 ereport(ERROR,
1850 (errcode(ERRCODE_DUPLICATE_JSON_OBJECT_KEY_VALUE),
1851 errmsg("duplicate JSON object key value")));
1852
1853 return false; /* not unique keys */
1854 }
1855
1856 if (check_unique_keys)
1857 freeJsonLexContext(&lex);
1858
1859 return true; /* ok */
1860}
static JsonParseErrorType json_unique_object_start(void *_state)
Definition: json.c:1755
static void json_unique_check_init(JsonUniqueCheckState *cxt)
Definition: json.c:933
static JsonParseErrorType json_unique_object_field_start(void *_state, char *field, bool isnull)
Definition: json.c:1788
static JsonParseErrorType json_unique_object_end(void *_state)
Definition: json.c:1773
JsonParseErrorType pg_parse_json(JsonLexContext *lex, const JsonSemAction *sem)
Definition: jsonapi.c:744
const JsonSemAction nullSemAction
Definition: jsonapi.c:287
void freeJsonLexContext(JsonLexContext *lex)
Definition: jsonapi.c:687
JsonParseErrorType
Definition: jsonapi.h:35
@ JSON_SUCCESS
Definition: jsonapi.h:36
JsonLexContext * makeJsonLexContext(JsonLexContext *lex, text *json, bool need_escapes)
Definition: jsonfuncs.c:540
void json_errsave_error(JsonParseErrorType error, JsonLexContext *lex, Node *escontext)
Definition: jsonfuncs.c:641
json_struct_action object_start
Definition: jsonapi.h:154
json_ofield_action object_field_start
Definition: jsonapi.h:158
void * semstate
Definition: jsonapi.h:153
json_struct_action object_end
Definition: jsonapi.h:155
Definition: regguts.h:323

References ereport, errcode(), errmsg(), ERROR, freeJsonLexContext(), json_errsave_error(), JSON_SUCCESS, json_unique_check_init(), json_unique_object_end(), json_unique_object_field_start(), json_unique_object_start(), makeJsonLexContext(), nullSemAction, JsonSemAction::object_end, JsonSemAction::object_field_start, JsonSemAction::object_start, pg_parse_json(), and JsonSemAction::semstate.

Referenced by ExecEvalJsonConstructor(), and ExecEvalJsonIsPredicate().

JsonEncodeDateTime()

char * JsonEncodeDateTime ( char *  buf,
Datum  value,
Oid  typid,
const int *  tzp 
)

Definition at line 311 of file json.c.

312{
313 if (!buf)
314 buf = palloc(MAXDATELEN + 1);
315
316 switch (typid)
317 {
318 case DATEOID:
319 {
321 struct pg_tm tm;
322
324
325 /* Same as date_out(), but forcing DateStyle */
328 else
329 {
331 &(tm.tm_year), &(tm.tm_mon), &(tm.tm_mday));
333 }
334 }
335 break;
336 case TIMEOID:
337 {
339 struct pg_tm tt,
340 *tm = &tt;
341 fsec_t fsec;
342
343 /* Same as time_out(), but forcing DateStyle */
344 time2tm(time, tm, &fsec);
345 EncodeTimeOnly(tm, fsec, false, 0, USE_XSD_DATES, buf);
346 }
347 break;
348 case TIMETZOID:
349 {
351 struct pg_tm tt,
352 *tm = &tt;
353 fsec_t fsec;
354 int tz;
355
356 /* Same as timetz_out(), but forcing DateStyle */
357 timetz2tm(time, tm, &fsec, &tz);
358 EncodeTimeOnly(tm, fsec, true, tz, USE_XSD_DATES, buf);
359 }
360 break;
361 case TIMESTAMPOID:
362 {
364 struct pg_tm tm;
365 fsec_t fsec;
366
368 /* Same as timestamp_out(), but forcing DateStyle */
371 else if (timestamp2tm(timestamp, NULL, &tm, &fsec, NULL, NULL) == 0)
372 EncodeDateTime(&tm, fsec, false, 0, NULL, USE_XSD_DATES, buf);
373 else
375 (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
376 errmsg("timestamp out of range")));
377 }
378 break;
379 case TIMESTAMPTZOID:
380 {
382 struct pg_tm tm;
383 int tz;
384 fsec_t fsec;
385 const char *tzn = NULL;
386
388
389 /*
390 * If a time zone is specified, we apply the time-zone shift,
391 * convert timestamptz to pg_tm as if it were without a time
392 * zone, and then use the specified time zone for converting
393 * the timestamp into a string.
394 */
395 if (tzp)
396 {
397 tz = *tzp;
399 }
400
401 /* Same as timestamptz_out(), but forcing DateStyle */
404 else if (timestamp2tm(timestamp, tzp ? NULL : &tz, &tm, &fsec,
405 tzp ? NULL : &tzn, NULL) == 0)
406 {
407 if (tzp)
408 tm.tm_isdst = 1; /* set time-zone presence flag */
409
410 EncodeDateTime(&tm, fsec, true, tz, tzn, USE_XSD_DATES, buf);
411 }
412 else
414 (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
415 errmsg("timestamp out of range")));
416 }
417 break;
418 default:
419 elog(ERROR, "unknown jsonb value datetime type oid %u", typid);
420 return NULL;
421 }
422
423 return buf;
424}
void EncodeTimeOnly(struct pg_tm *tm, fsec_t fsec, bool print_tz, int tz, int style, char *str)
Definition: datetime.c:4434
void j2date(int jd, int *year, int *month, int *day)
Definition: datetime.c:321
void EncodeDateTime(struct pg_tm *tm, fsec_t fsec, bool print_tz, int tz, const char *tzn, int style, char *str)
Definition: datetime.c:4464
void EncodeDateOnly(struct pg_tm *tm, int style, char *str)
Definition: datetime.c:4349
void EncodeSpecialTimestamp(Timestamp dt, char *str)
Definition: timestamp.c:1587
int timestamp2tm(Timestamp dt, int *tzp, struct pg_tm *tm, fsec_t *fsec, const char **tzn, pg_tz *attimezone)
Definition: timestamp.c:1910
int64 Timestamp
Definition: timestamp.h:38
int64 TimestampTz
Definition: timestamp.h:39
int32 fsec_t
Definition: timestamp.h:41
#define USECS_PER_SEC
Definition: timestamp.h:134
#define TIMESTAMP_NOT_FINITE(j)
Definition: timestamp.h:169
#define POSTGRES_EPOCH_JDATE
Definition: timestamp.h:235
int timetz2tm(TimeTzADT *time, struct pg_tm *tm, fsec_t *fsec, int *tzp)
Definition: date.c:2550
int time2tm(TimeADT time, struct pg_tm *tm, fsec_t *fsec)
Definition: date.c:1635
void EncodeSpecialDate(DateADT dt, char *str)
Definition: date.c:302
#define DATE_NOT_FINITE(j)
Definition: date.h:43
static TimeTzADT * DatumGetTimeTzADTP(Datum X)
Definition: date.h:66
int32 DateADT
Definition: date.h:23
static DateADT DatumGetDateADT(Datum X)
Definition: date.h:54
static TimeADT DatumGetTimeADT(Datum X)
Definition: date.h:60
int64 TimeADT
Definition: date.h:25
#define elog(elevel,...)
Definition: elog.h:226
#define MAXDATELEN
Definition: datetime.h:200
static struct @169 value
static struct pg_tm tm
Definition: localtime.c:104
void * palloc(Size size)
Definition: mcxt.c:1365
#define USE_XSD_DATES
Definition: miscadmin.h:239
long date
Definition: pgtypes_date.h:9
int64 timestamp
Definition: date.h:28
Definition: pgtime.h:35
int tm_mday
Definition: pgtime.h:39
int tm_mon
Definition: pgtime.h:40
int tm_isdst
Definition: pgtime.h:44
int tm_year
Definition: pgtime.h:41
static Timestamp DatumGetTimestamp(Datum X)
Definition: timestamp.h:28
static TimestampTz DatumGetTimestampTz(Datum X)
Definition: timestamp.h:34

References buf, DATE_NOT_FINITE, DatumGetDateADT(), DatumGetTimeADT(), DatumGetTimestamp(), DatumGetTimestampTz(), DatumGetTimeTzADTP(), elog, EncodeDateOnly(), EncodeDateTime(), EncodeSpecialDate(), EncodeSpecialTimestamp(), EncodeTimeOnly(), ereport, errcode(), errmsg(), ERROR, j2date(), MAXDATELEN, palloc(), POSTGRES_EPOCH_JDATE, time2tm(), timestamp2tm(), TIMESTAMP_NOT_FINITE, timetz2tm(), tm, pg_tm::tm_isdst, pg_tm::tm_mday, pg_tm::tm_mon, pg_tm::tm_year, USE_XSD_DATES, USECS_PER_SEC, and value.

Referenced by convertJsonbScalar(), datum_to_json_internal(), datum_to_jsonb_internal(), and executeItemOptUnwrapTarget().

to_json_is_immutable()

bool to_json_is_immutable ( Oid  typoid )

Definition at line 701 of file json.c.

702{
703 JsonTypeCategory tcategory;
704 Oid outfuncoid;
705
706 json_categorize_type(typoid, false, &tcategory, &outfuncoid);
707
708 switch (tcategory)
709 {
710 case JSONTYPE_BOOL:
711 case JSONTYPE_JSON:
712 case JSONTYPE_JSONB:
713 case JSONTYPE_NULL:
714 return true;
715
716 case JSONTYPE_DATE:
719 return false;
720
721 case JSONTYPE_ARRAY:
722 return false; /* TODO recurse into elements */
723
725 return false; /* TODO recurse into fields */
726
727 case JSONTYPE_NUMERIC:
728 case JSONTYPE_CAST:
729 case JSONTYPE_OTHER:
730 return func_volatile(outfuncoid) == PROVOLATILE_IMMUTABLE;
731 }
732
733 return false; /* not reached */
734}
void json_categorize_type(Oid typoid, bool is_jsonb, JsonTypeCategory *tcategory, Oid *outfuncoid)
Definition: jsonfuncs.c:5999
JsonTypeCategory
Definition: jsonfuncs.h:69
@ JSONTYPE_JSON
Definition: jsonfuncs.h:76
@ JSONTYPE_NULL
Definition: jsonfuncs.h:70
@ JSONTYPE_TIMESTAMP
Definition: jsonfuncs.h:74
@ JSONTYPE_NUMERIC
Definition: jsonfuncs.h:72
@ JSONTYPE_DATE
Definition: jsonfuncs.h:73
@ JSONTYPE_BOOL
Definition: jsonfuncs.h:71
@ JSONTYPE_OTHER
Definition: jsonfuncs.h:81
@ JSONTYPE_CAST
Definition: jsonfuncs.h:80
@ JSONTYPE_COMPOSITE
Definition: jsonfuncs.h:79
@ JSONTYPE_ARRAY
Definition: jsonfuncs.h:78
@ JSONTYPE_TIMESTAMPTZ
Definition: jsonfuncs.h:75
@ JSONTYPE_JSONB
Definition: jsonfuncs.h:77
char func_volatile(Oid funcid)
Definition: lsyscache.c:1947
unsigned int Oid
Definition: postgres_ext.h:32

References func_volatile(), json_categorize_type(), JSONTYPE_ARRAY, JSONTYPE_BOOL, JSONTYPE_CAST, JSONTYPE_COMPOSITE, JSONTYPE_DATE, JSONTYPE_JSON, JSONTYPE_JSONB, JSONTYPE_NULL, JSONTYPE_NUMERIC, JSONTYPE_OTHER, JSONTYPE_TIMESTAMP, and JSONTYPE_TIMESTAMPTZ.

Referenced by contain_mutable_functions_walker().

AltStyle によって変換されたページ (->オリジナル) /