Re: pg_dump: Remove trivial usage of PQExpBuffer - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: pg_dump: Remove trivial usage of PQExpBuffer
Date
Msg-id 2d0721b4-fbca-467c-b0ee-0d465b371dc8@eisentraut.org
Whole thread Raw
In response to pg_dump: Remove trivial usage of PQExpBuffer  (Corey Huinker <corey.huinker@gmail.com>)
Responses Re: pg_dump: Remove trivial usage of PQExpBuffer
List 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.



pgsql-hackers by date:

Previous
From: Kirill Reshke
Date:
Subject: Do not emit FPW for unlogged relations in BRIN empty-page
Next
From: Andres Freund
Date:
Subject: Re: Add sanity check for duplicate enum values in GUC definitions