Fixup some appendPQExpBuffer() calls

Started by David Rowleyabout 1 year ago4 messageshackers
Jump to latest
#1David Rowley
dgrowleyml@gmail.com

In a similar effort to what I did in [1]/messages/by-id/CAApHDvqJnNjueb=Eoj8K+8n0g7nj_AcPWSiCj5RNV4fDejAfqA@mail.gmail.com, there's a bunch of
appendPQExpBuffer() calls that could use appendPQExpBufferStr() or
appendPQExpBufferChar(). With [1]/messages/by-id/CAApHDvqJnNjueb=Eoj8K+8n0g7nj_AcPWSiCj5RNV4fDejAfqA@mail.gmail.com, I've been keeping those
appendStringInfo calls in check at this time of year for a few years
now. With appendPQExpBuffer I've not been, so a bunch of the changes
in 0002 touch code that's older than master. In one case as old as
v11.

See the attached summary.txt for details on when each of these first
appeared. The 0001 patch is the method I used to find these (which is
a bit cruddy and not for commit)

I'm now wondering if:

1) I should commit the attached 0002 patch now, or;
2) Should commit only the new-to-v18 ones now, or;
3) do nothing.

I think #3 isn't a good option as we (or I) have made efforts in the
past to keep these in check. Also, for me, #2 isn't ideal as if I do
this next year for v19, I'll need to ignore the older inconsistencies,
and I'd rather not have to do that, so I vote for #1.

Any other opinions?

David

[1]: /messages/by-id/CAApHDvqJnNjueb=Eoj8K+8n0g7nj_AcPWSiCj5RNV4fDejAfqA@mail.gmail.com

Attachments:

summary.txttext/plain; charset=US-ASCII; name=summary.txtDownload
v1-0001-Adjust-code-to-highlight-appendStringInfo-misusag.patchapplication/octet-stream; name=v1-0001-Adjust-code-to-highlight-appendStringInfo-misusag.patchDownload+89-41
v1-0002-Fixup-various-usages-of-appendPQExpBuffer.patchapplication/octet-stream; name=v1-0002-Fixup-various-usages-of-appendPQExpBuffer.patchDownload+51-55
#2David Rowley
dgrowleyml@gmail.com
In reply to: David Rowley (#1)
Re: Fixup some appendPQExpBuffer() calls

On Mon, 14 Apr 2025 at 19:39, David Rowley <dgrowleyml@gmail.com> wrote:

1) I should commit the attached 0002 patch now, or;
2) Should commit only the new-to-v18 ones now, or;
3) do nothing.

I think #3 isn't a good option as we (or I) have made efforts in the
past to keep these in check. Also, for me, #2 isn't ideal as if I do
this next year for v19, I'll need to ignore the older inconsistencies,
and I'd rather not have to do that, so I vote for #1.

Any other opinions?

To reduce the above 3 options down to two, I just pushed the ones that
were new to v18. The attached patch handles the ones that were added
prior to v18.

The options now are:
1) Commit the attached to master
2) Do nothing.

I'd like to do #1.

David

Attachments:

v2-0001-Fixup-various-older-usages-of-appendPQExpBuffer.patchapplication/octet-stream; name=v2-0001-Fixup-various-older-usages-of-appendPQExpBuffer.patchDownload+40-41
#3Daniel Gustafsson
daniel@yesql.se
In reply to: David Rowley (#2)
Re: Fixup some appendPQExpBuffer() calls

On 17 Apr 2025, at 01:44, David Rowley <dgrowleyml@gmail.com> wrote:

To reduce the above 3 options down to two, I just pushed the ones that
were new to v18. The attached patch handles the ones that were added
prior to v18.

The options now are:
1) Commit the attached to master
2) Do nothing.

I'd like to do #1.

I vote for #1 as well.

--
Daniel Gustafsson

#4David Rowley
dgrowleyml@gmail.com
In reply to: Daniel Gustafsson (#3)
Re: Fixup some appendPQExpBuffer() calls

On Thu, 17 Apr 2025 at 19:50, Daniel Gustafsson <daniel@yesql.se> wrote:

On 17 Apr 2025, at 01:44, David Rowley <dgrowleyml@gmail.com> wrote:
1) Commit the attached to master
2) Do nothing.

I'd like to do #1.

I vote for #1 as well.

Thanks for the judgment sense check. I suspect anyone who thought #2
would have come forward by now, so I've pushed the changes.

David