aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/basics.source
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2023-07-05 06:56:37 +0200
committerPeter Eisentraut <peter@eisentraut.org>2023-07-05 07:15:23 +0200
commitcccdbc5d95aca276789bbe28783f3e06f9a3ba9c (patch)
treec7aef59a0132794c5fe766548b4e67a837a50a1f /src/tutorial/basics.source
parentfa88928470b538c0ec0289e4d69ee12356c5a8ce (diff)
downloadpostgresql-cccdbc5d95aca276789bbe28783f3e06f9a3ba9c.tar.gz
postgresql-cccdbc5d95aca276789bbe28783f3e06f9a3ba9c.zip
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, but that is different enough that I didn't consider it here.) This has all evolved a bit organically, with fixed-size buffers, and various optional command-line arguments being injected with confusing-looking code, and the spacing between options handled in inconsistent ways. Clean all this up a bit to look clearer and be more easily extensible with new arguments and options. We start each command with printfPQExpBuffer(), and then append arguments as necessary with appendPQExpBuffer(). Also standardize on using initPQExpBuffer() over createPQExpBuffer() where possible. pg_regress uses StringInfo instead of PQExpBuffer, but many of the same ideas apply. Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://www.postgresql.org/message-id/flat/16d0beac-a141-e5d3-60e9-323da75f49bf@eisentraut.org
Diffstat (limited to 'src/tutorial/basics.source')
0 files changed, 0 insertions, 0 deletions