json.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*-------------------------------------------------------------------------
  2. *
  3. * json.h
  4. * Declarations for JSON data type support.
  5. *
  6. * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
  7. * Portions Copyright (c) 1994, Regents of the University of California
  8. *
  9. * src/include/utils/json.h
  10. *
  11. *-------------------------------------------------------------------------
  12. */
  13. #ifndef JSON_H
  14. #define JSON_H
  15. #include "fmgr.h"
  16. #include "lib/stringinfo.h"
  17. /* functions in json.c */
  18. extern Datum json_in(PG_FUNCTION_ARGS);
  19. extern Datum json_out(PG_FUNCTION_ARGS);
  20. extern Datum json_recv(PG_FUNCTION_ARGS);
  21. extern Datum json_send(PG_FUNCTION_ARGS);
  22. extern Datum array_to_json(PG_FUNCTION_ARGS);
  23. extern Datum array_to_json_pretty(PG_FUNCTION_ARGS);
  24. extern Datum row_to_json(PG_FUNCTION_ARGS);
  25. extern Datum row_to_json_pretty(PG_FUNCTION_ARGS);
  26. extern Datum to_json(PG_FUNCTION_ARGS);
  27. extern Datum json_agg_transfn(PG_FUNCTION_ARGS);
  28. extern Datum json_agg_finalfn(PG_FUNCTION_ARGS);
  29. extern Datum json_object_agg_finalfn(PG_FUNCTION_ARGS);
  30. extern Datum json_object_agg_transfn(PG_FUNCTION_ARGS);
  31. extern Datum json_build_object(PG_FUNCTION_ARGS);
  32. extern Datum json_build_object_noargs(PG_FUNCTION_ARGS);
  33. extern Datum json_build_array(PG_FUNCTION_ARGS);
  34. extern Datum json_build_array_noargs(PG_FUNCTION_ARGS);
  35. extern Datum json_object(PG_FUNCTION_ARGS);
  36. extern Datum json_object_two_arg(PG_FUNCTION_ARGS);
  37. extern void escape_json(StringInfo buf, const char *str);
  38. extern Datum json_typeof(PG_FUNCTION_ARGS);
  39. /* functions in jsonfuncs.c */
  40. extern Datum json_object_field(PG_FUNCTION_ARGS);
  41. extern Datum json_object_field_text(PG_FUNCTION_ARGS);
  42. extern Datum json_array_element(PG_FUNCTION_ARGS);
  43. extern Datum json_array_element_text(PG_FUNCTION_ARGS);
  44. extern Datum json_extract_path(PG_FUNCTION_ARGS);
  45. extern Datum json_extract_path_text(PG_FUNCTION_ARGS);
  46. extern Datum json_object_keys(PG_FUNCTION_ARGS);
  47. extern Datum json_array_length(PG_FUNCTION_ARGS);
  48. extern Datum json_each(PG_FUNCTION_ARGS);
  49. extern Datum json_each_text(PG_FUNCTION_ARGS);
  50. extern Datum json_array_elements(PG_FUNCTION_ARGS);
  51. extern Datum json_array_elements_text(PG_FUNCTION_ARGS);
  52. extern Datum json_populate_record(PG_FUNCTION_ARGS);
  53. extern Datum json_populate_recordset(PG_FUNCTION_ARGS);
  54. extern Datum json_to_record(PG_FUNCTION_ARGS);
  55. extern Datum json_to_recordset(PG_FUNCTION_ARGS);
  56. extern Datum json_strip_nulls(PG_FUNCTION_ARGS);
  57. extern Datum jsonb_object_field(PG_FUNCTION_ARGS);
  58. extern Datum jsonb_object_field_text(PG_FUNCTION_ARGS);
  59. extern Datum jsonb_array_element(PG_FUNCTION_ARGS);
  60. extern Datum jsonb_array_element_text(PG_FUNCTION_ARGS);
  61. extern Datum jsonb_extract_path(PG_FUNCTION_ARGS);
  62. extern Datum jsonb_extract_path_text(PG_FUNCTION_ARGS);
  63. extern Datum jsonb_object_keys(PG_FUNCTION_ARGS);
  64. extern Datum jsonb_array_length(PG_FUNCTION_ARGS);
  65. extern Datum jsonb_each(PG_FUNCTION_ARGS);
  66. extern Datum jsonb_each_text(PG_FUNCTION_ARGS);
  67. extern Datum jsonb_array_elements_text(PG_FUNCTION_ARGS);
  68. extern Datum jsonb_array_elements(PG_FUNCTION_ARGS);
  69. extern Datum jsonb_populate_record(PG_FUNCTION_ARGS);
  70. extern Datum jsonb_populate_recordset(PG_FUNCTION_ARGS);
  71. extern Datum jsonb_to_record(PG_FUNCTION_ARGS);
  72. extern Datum jsonb_to_recordset(PG_FUNCTION_ARGS);
  73. extern Datum jsonb_strip_nulls(PG_FUNCTION_ARGS);
  74. #endif /* JSON_H */