Re: Clean up command argument assembly

2024-02-04 Thread Tom Lane
Peter Eisentraut writes: > Should anything outside of libpq be using PQExpBuffer? Perhaps not. PQExpBuffer's behavior for OOM cases is designed specifically for libpq, where exit-on-OOM is not okay and we can hope to include failure checks wherever needed. For most of our application code, we'd

Re: Clean up command argument assembly

2024-02-04 Thread Peter Eisentraut
On 05.07.23 07:22, Peter Eisentraut wrote: It's a bit bogus to use PQExpBuffer for these. If you run out of memory, you silently get an empty string instead. StringInfo, which exits the process on OOM, would be more appropriate. We have tons of such inappropriate uses of PQExpBuffer in all our

Re: Clean up command argument assembly

2023-07-04 Thread Peter Eisentraut
On 04.07.23 14:14, Heikki Linnakangas wrote: On 26/06/2023 12:33, Peter Eisentraut wrote: This is a small code cleanup patch. Several commands internally assemble command lines to call other commands.  This includes initdb, pg_dumpall, and pg_regress.  (Also pg_ctl, but that is different enough

Re: Clean up command argument assembly

2023-07-04 Thread Heikki Linnakangas
On 26/06/2023 12:33, Peter Eisentraut wrote: This is a small code cleanup patch. Several commands internally assemble command lines to call other commands. This includes initdb, pg_dumpall, and pg_regress. (Also pg_ctl, but that is different enough that I didn't consider it here.) This has all

Clean up command argument assembly

2023-06-26 Thread Peter Eisentraut
.From dbd9d7b7ff2c069a131c9efa8bff2597c0d9e1c8 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 26 Jun 2023 11:30:24 +0200 Subject: [PATCH] Clean up command argument assembly Several commands internally assemble command lines to call other commands. This includes initdb, pg_dumpall, and pg_regress. (Also pg_ctl