Re: appendBinaryStringInfo stuff
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: David Rowley <dgrowleyml@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-12-23T09:04:33Z
Lists: pgsql-hackers
Attachments
- v2-0001-Use-appendStringInfoString-instead-of-appendBinar.patch (text/plain) patch v2-0001
- v2-0002-Change-argument-of-appendBinaryStringInfo-from-ch.patch (text/plain) patch v2-0002
On 19.12.22 23:48, David Rowley wrote: > On Tue, 20 Dec 2022 at 11:42, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> I think Peter is entirely right to question whether *this* type's >> output function is performance-critical. Who's got large tables with >> jsonpath columns? It seems to me the type would mostly only exist >> as constants within queries. > > The patch touches code in the path of jsonb's output function too. I > don't think you could claim the same for that. Ok, let's leave the jsonb output alone. The jsonb output code also won't change a lot, but there is a bunch of stuff for jsonpath on the horizon, so having some more robust coding style to imitate there seems useful. Here is another patch set with the jsonb changes omitted.
Commits
-
Change argument type of pq_sendbytes from char * to void *
- 3b12e68a5c46 16.0 landed
-
Remove useless casts to (void *) in hash_search() calls
- 54a177a948b0 16.0 cited
-
Change argument of appendBinaryStringInfo from char * to void *
- 1f605b82ba66 16.0 landed
-
Use appendStringInfoString instead of appendBinaryStringInfo where possible
- 33a33f0ba4d7 16.0 landed