Subject: pg_dumpall appendPQExpBuffer construct sql need an white space

From: jian he <[email-masked]>
Date: Thu, 16 Jan 2025 10:53:51 +0800

hi.

in src/bin/pg_dump/pg_dumpall.c
    appendPQExpBuffer(buf, " FROM pg_auth_members a "
                      "LEFT JOIN %s ur on ur.oid = a.roleid "
                      "LEFT JOIN %s um on um.oid = a.member "
                      "LEFT JOIN %s ug on ug.oid = a.grantor "
                      "WHERE NOT (ur.rolname ~ '^pg_' AND um.rolname ~ '^pg_')"
                      "ORDER BY 1,2,4", role_catalog, role_catalog,
role_catalog);

here "WHERE NOT (ur.rolname ~ '^pg_' AND um.rolname ~ '^pg_')"
need a white space at the end?

---

From: Tom Lane <[email-masked]>
Date: Wed, 15 Jan 2025 21:59:59 -0500

> need a white space at the end?

The right paren is its own token in any case, so we don't need
a space for correctness.  You could argue that it'd improve
readability, but who reads pg_dumpall's queries?

			regards, tom lane