Re: pgsql: Some refactoring to export json(b) conversion functions

2023-10-05 Thread Alvaro Herrera
On 2023-Aug-08, Alvaro Herrera wrote: > One idea that Tom floated was to allow the JsonLexContext to be > optionally stack-allocated. That reduces palloc() traffic; but some > callers do need it to be palloc'ed. Here's a patch that does it that > way, and adds a freeing routine that knows what t

Re: pgsql: Some refactoring to export json(b) conversion functions

2023-08-08 Thread Alvaro Herrera
On 2023-Jul-26, Amit Langote wrote: > Some refactoring to export json(b) conversion functions > > This is to export datum_to_json(), datum_to_jsonb(), and > jsonb_from_cstring(), though the last one is exported as > jsonb_from_text(). After this commit, Coverity started complaining that datum_to