diff options
author | Robert Haas <rhaas@postgresql.org> | 2019-12-05 15:14:09 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2019-12-05 15:14:09 -0500 |
commit | 431ba7bebf139b6edf5544ce18f39a1a4dcb8110 (patch) | |
tree | c9b50cad50359c2350980f2e95280a92c455bd0c /src/backend/parser/parse_utilcmd.c | |
parent | 42f362967d9f82043608610c689c24046e07497c (diff) | |
download | postgresql-431ba7bebf139b6edf5544ce18f39a1a4dcb8110.tar.gz postgresql-431ba7bebf139b6edf5544ce18f39a1a4dcb8110.zip |
pg_basebackup: Refactor code for reading COPY and tar data.
Add a new function ReceiveCopyData that does just that, taking a
callback as an argument to specify what should be done with each chunk
as it is received. This allows a single copy of the logic to be shared
between ReceiveTarFile and ReceiveAndUnpackTarFile, and eliminates
a few #ifdef conditions based on HAVE_LIBZ.
While this is slightly more code, it's arguably clearer, and
there is a pending patch that introduces additional calls to
ReceiveCopyData.
This commit is not intended to result in any functional change.
Discussion: http://postgr.es/m/CA+TgmoYZDTHbSpwZtW=JDgAhwVAYvmdSrRUjOd+AYdfNNXVBDg@mail.gmail.com
Diffstat (limited to 'src/backend/parser/parse_utilcmd.c')
0 files changed, 0 insertions, 0 deletions