Fixup some misusage of appendStringInfo and friends

Started by David Rowleyover 9 years ago7 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

won't retrysuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t36536
psql -h localhost -U postgres

Built from patchset v1 (message #1), July 28, 2026 at 07:02 AM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t36536_1 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t36536_1 && git checkout t36536_1

Patchset v1 (message #1) is on t36536_1

Jump to latest
#1David Rowley
dgrowleyml@gmail.com

The attached cleans up a few small misusages of appendStringInfo and
related functions.

Some similar work was done in,

f92d6a540ac443f85f0929b284edff67da14687a
d02f16470f117db3038dbfd87662d5f0eb5a2a9b
cacbdd78106526d7c4f11f90b538f96ba8696fb0

so the majority of these should all be new misuseages.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachments:

t36536_1
appendStringInfo_fixes.patchapplication/octet-stream; name=appendStringInfo_fixes.patchDownload+56-57
#2Ashutosh Bapat
ashutosh.bapat.oss@gmail.com
In reply to: David Rowley (#1)
Re: Fixup some misusage of appendStringInfo and friends

I reviewed the patch. It compiles clean, make check-world passes. I do
not see any issue with it.

On Wed, Apr 19, 2017 at 9:13 AM, David Rowley
<david.rowley@2ndquadrant.com> wrote:

The attached cleans up a few small misusages of appendStringInfo and
related functions.

Some similar work was done in,

f92d6a540ac443f85f0929b284edff67da14687a
d02f16470f117db3038dbfd87662d5f0eb5a2a9b
cacbdd78106526d7c4f11f90b538f96ba8696fb0

so the majority of these should all be new misuseages.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Ashutosh Bapat (#2)
Re: Fixup some misusage of appendStringInfo and friends

On 4/19/17 08:42, Ashutosh Bapat wrote:

I reviewed the patch. It compiles clean, make check-world passes. I do
not see any issue with it.

Looks reasonable. Let's keep it for the next commit fest.

On Wed, Apr 19, 2017 at 9:13 AM, David Rowley
<david.rowley@2ndquadrant.com> wrote:

The attached cleans up a few small misusages of appendStringInfo and
related functions.

Some similar work was done in,

f92d6a540ac443f85f0929b284edff67da14687a
d02f16470f117db3038dbfd87662d5f0eb5a2a9b
cacbdd78106526d7c4f11f90b538f96ba8696fb0

so the majority of these should all be new misuseages.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4David Rowley
dgrowleyml@gmail.com
In reply to: Peter Eisentraut (#3)
Re: Fixup some misusage of appendStringInfo and friends

On 27 April 2017 at 06:41, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:

On 4/19/17 08:42, Ashutosh Bapat wrote:

I reviewed the patch. It compiles clean, make check-world passes. I do
not see any issue with it.

Looks reasonable. Let's keep it for the next commit fest.

Thank you to both of you for looking. I'd thought that maybe the new
stuff in PG10 should be fixed before the release. If we waited, and
fix in PG11 then backpatching is more of a pain.

However, I wasn't careful in the patch to touch only new to PG10 code.

I'll defer to your better judgment and add to the next 'fest.

Thanks

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#5Heikki Linnakangas
heikki.linnakangas@enterprisedb.com
In reply to: David Rowley (#4)
Re: Fixup some misusage of appendStringInfo and friends

On 04/27/2017 03:14 AM, David Rowley wrote:

On 27 April 2017 at 06:41, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:

On 4/19/17 08:42, Ashutosh Bapat wrote:

I reviewed the patch. It compiles clean, make check-world passes. I do
not see any issue with it.

Looks reasonable. Let's keep it for the next commit fest.

Thank you to both of you for looking. I'd thought that maybe the new
stuff in PG10 should be fixed before the release. If we waited, and
fix in PG11 then backpatching is more of a pain.

However, I wasn't careful in the patch to touch only new to PG10 code.

I'll defer to your better judgment and add to the next 'fest.

I think that's a very good argument. Cleaning up code that's new in this
version seems like a fair game, and a good idea. The places that are not
new in PostgreSQL 10 are more questionable, but seems harmless enough
anyway.

Did you have an outright objection to this, Peter? The patch looks good
to me at a quick glance, I think we should commit this now.

- Heikki

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#6Peter Eisentraut
peter_e@gmx.net
In reply to: David Rowley (#4)
Re: Fixup some misusage of appendStringInfo and friends

On 4/26/17 20:14, David Rowley wrote:

On 27 April 2017 at 06:41, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:

On 4/19/17 08:42, Ashutosh Bapat wrote:

I reviewed the patch. It compiles clean, make check-world passes. I do
not see any issue with it.

Looks reasonable. Let's keep it for the next commit fest.

Thank you to both of you for looking. I'd thought that maybe the new
stuff in PG10 should be fixed before the release. If we waited, and
fix in PG11 then backpatching is more of a pain.

However, I wasn't careful in the patch to touch only new to PG10 code.

I'll defer to your better judgment and add to the next 'fest.

committed

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#7David Rowley
dgrowleyml@gmail.com
In reply to: Peter Eisentraut (#6)
Re: Fixup some misusage of appendStringInfo and friends

On 16 August 2017 at 15:38, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:

committed

Thanks!

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers