diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2021-12-16 12:01:59 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2021-12-16 12:01:59 -0500 |
commit | c49d926833fa6a987e3f9a66027f4a01d7a008be (patch) | |
tree | e2eb64f8d7406a299c9c4fd8d758fbe5aaddb5f7 /src/bin/pg_dump/pg_dump.c | |
parent | 58e2e6eb67fec14c793c74207407e172d7e0291d (diff) | |
download | postgresql-c49d926833fa6a987e3f9a66027f4a01d7a008be.tar.gz postgresql-c49d926833fa6a987e3f9a66027f4a01d7a008be.zip |
Clean up some more freshly-dead code in pg_dump and pg_upgrade.
I missed a few things in 30e7c175b and e469f0aaf,
as noted by Justin Pryzby.
Discussion: https://postgr.es/m/2923349.1634942313@sss.pgh.pa.us
Diffstat (limited to 'src/bin/pg_dump/pg_dump.c')
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 15dae8bd88e..784771c2d7e 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -11444,19 +11444,17 @@ dumpFunc(Archive *fout, const FuncInfo *finfo) /* * See backend/commands/functioncmds.c for details of how the 'AS' clause - * is used. In 8.4 and up, an unused probin is NULL (here ""); previous - * versions would set it to "-". There are no known cases in which prosrc - * is unused, so the tests below for "-" are probably useless. + * is used. */ if (prosqlbody) { appendPQExpBufferStr(asPart, prosqlbody); } - else if (probin[0] != '\0' && strcmp(probin, "-") != 0) + else if (probin[0] != '\0') { appendPQExpBufferStr(asPart, "AS "); appendStringLiteralAH(asPart, probin, fout); - if (strcmp(prosrc, "-") != 0) + if (prosrc[0] != '\0') { appendPQExpBufferStr(asPart, ", "); @@ -11473,15 +11471,12 @@ dumpFunc(Archive *fout, const FuncInfo *finfo) } else { - if (strcmp(prosrc, "-") != 0) - { - appendPQExpBufferStr(asPart, "AS "); - /* with no bin, dollar quote src unconditionally if allowed */ - if (dopt->disable_dollar_quoting) - appendStringLiteralAH(asPart, prosrc, fout); - else - appendStringLiteralDQ(asPart, prosrc, NULL); - } + appendPQExpBufferStr(asPart, "AS "); + /* with no bin, dollar quote src unconditionally if allowed */ + if (dopt->disable_dollar_quoting) + appendStringLiteralAH(asPart, prosrc, fout); + else + appendStringLiteralDQ(asPart, prosrc, NULL); } nallargs = finfo->nargs; /* unless we learn different from allargs */ |