Additional comments around need_escapes in pg_parse_json()

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Additional comments around need_escapes in pg_parse_json()
Date: 2024-12-20 10:21:45
Message-ID: CADkLM=c49Vkfg2+A8ubSuEtaGEjuaKZXCA6SrXA8kdwHjx3uxQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I recently had occasion to use the pg_parse_json() function for creating
input functions for pg_ndistinct and pg_dependencies.

While it is obvious now that I should have been parsing with
need_escapes=true, it wasn't obvious from the outset, and so I'm proposing
adding a few comments to help the next person come to that conclusion
sooner than I did.

Attachment Content-Type Size
v1-0001-Explain-impact-of-need_escapes-in-JSON-parsing.patch text/x-patch 2.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2024-12-20 10:27:03 Re: Fix crash when non-creator being an iteration on shared radix tree
Previous Message David Rowley 2024-12-20 10:04:50 Re: Make tuple deformation faster