| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
| Cc: | 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 16:50:32 |
| Message-ID: | r753yzskwprudwyzr2cqsayr24l2ybciralpx7tdd4vufhqpt2@7r2btwrnihox |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On 2025-12-17 16:15:21 +0100, Peter Eisentraut wrote:
> 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.
It also just seems like a pain for backpatching. If this were a huge
improvement or if the code in question was being newly added, it'd perhaps be
a different story, but as is...
Greetings,
Andres Freund
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sami Imseih | 2025-12-17 17:01:01 | Re: [Proposal] Adding callback support for custom statistics kinds |
| Previous Message | Iván Chavero | 2025-12-17 16:12:48 | Re: libxml2 video about its abandonment |