On Fri, 20 Jan 2023 at 10:23, Peter Smith wrote:
> Should the add_indent function also have a check to avoid making
> unnecessary calls to appendStringInfoSpaces when the level is 0?
Although I didn't opt to do that, thank you for having a look.
I do think the patch is trivially simple and nobod
On Fri, 20 Jan 2023 at 10:25, Tom Lane wrote:
>
> Peter Smith writes:
> > Should the add_indent function also have a check to avoid making
> > unnecessary calls to appendStringInfoSpaces when the level is 0?
>
> Seems like unnecessary extra notation, seeing that appendStringInfoSpaces
> will fall
Peter Smith writes:
> Should the add_indent function also have a check to avoid making
> unnecessary calls to appendStringInfoSpaces when the level is 0?
Seems like unnecessary extra notation, seeing that appendStringInfoSpaces
will fall out quickly for a zero argument.
r
On Thu, Jan 19, 2023 at 8:45 PM David Rowley wrote:
>
> In [1] I noticed a bit of a poor usage of appendStringInfoString which
> just appends 4 spaces in a loop, one for each indent level of the
> jsonb. It should be better just to use appendStringInfoSpaces and
> just append all the spaces in on