On Wed, Jul 6, 2022 at 12:18 PM Andres Freund <andres@anarazel.de> wrote:
> I think before committing something along those lines we should make the
> relevant bits also be applicable when ->strval is NULL, as several functions
> use that (notably json_in IIRC). Afaics we'd just need to move the strval
> check to be around the appendBinaryStringInfo().
That makes sense and is easy.
> And it should simplify the
> function, because some of the relevant code is duplicated outside as well...
Not sure how far to take this, but I put the returnable paths inside
the "other" path, so only backslash will go back to the top.
Both the above changes are split into a new 0003 patch for easier
review, but in the end will likely be squashed with 0002.
--
John Naylor
EDB: http://www.enterprisedb.com