pg_dump: Remove trivial usage of PQExpBuffer

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: pg_dump: Remove trivial usage of PQExpBuffer
Date: 2025-12-16 22:03:13
Message-ID: CADkLM=dVdskX03Mtb-eWpiWCfkKcenzRim_sauFf3Z5x2uLF2Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I've been looking at ways to reorganize and/or clean up pg_dump.c.

One thing I have noticed is the usage of PQExpBuffer in situations where
the query has no optional parts and no string interpolation.

Attached is a patch to replace those usages with the string literal itself.
There are still a few cases where a buffer is used for a trivial query and
then reset and reused for a more complicated query generation. In those
cases, I did not make the change so as to keep this patch simple.

Attachment Content-Type Size
v1-0001-Remove-PQExpBuffer-usage-in-trivial-cases.patch text/x-patch 39.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-12-16 22:36:13 Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB ?barriers
Previous Message Mihail Nikalayeu 2025-12-16 21:58:00 Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements