[GENERAL] HeapTuple to JSON -- composite_to_json()?

2016-01-21 Thread Jason Dusek
Hi All, I am working on a logical decoder and would like to convert a heap tuple to JSON (a HeapTuple obtained from ReorderBufferChange). It is the moral equivalent of tuple_to_stringinfo in test_decode.c: http://doxygen.postgresql.org/test__decoding_8c.html#a3986a57a0308de0150ebd45f7734d464 It

Re: [GENERAL] HeapTuple to JSON -- composite_to_json()?

2016-01-21 Thread Jason Dusek
heap_copy_tuple_as_datum looks promising… http://doxygen.postgresql.org/heaptuple_8c.html#abfa9096cd7909cb17a6acfdc7b31b7ad