Re: pg_dump: Remove trivial usage of PQExpBuffer

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pg_dump: Remove trivial usage of PQExpBuffer
Date: 2025-12-17 15:15:21
Message-ID: 2d0721b4-fbca-467c-b0ee-0d465b371dc8@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 16.12.25 23:03, Corey Huinker wrote:
> 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.

I'm not sure this is better. It seems better to me to use consistent
APIs throughout. Kind of like using printf even if you don't need to
substitute anything, rather than using a mix of printf and puts.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-12-17 15:19:54 Re: Add sanity check for duplicate enum values in GUC definitions
Previous Message Kirill Reshke 2025-12-17 15:13:22 Do not emit FPW for unlogged relations in BRIN empty-page