Fix pg_dump's handling of public schema with both -c and -C options.
Fix pg_dump's handling of public schema with both -c and -C options.

Since -c plus -C requests dropping and recreating the target database
as a whole, not dropping individual objects in it, we should assume that
the public schema already exists and need not be created.  The previous
coding considered only the state of the -c option, so it would emit
"CREATE SCHEMA public" anyway, leading to an unexpected error in restore.

Back-patch to 9.2.  Older versions did not accept -c with -C so the
issue doesn't arise there.  (The logic being patched here dates to 8.0,
cf commit 2193121fa, so it's not really wrong that it didn't consider
the case at the time.)

Note that versions before 9.6 will still attempt to emit REVOKE/GRANT
on the public schema; but that happens without -c/-C too, and doesn't
seem to be the focus of this complaint.  I considered extending this
stanza to also skip the public schema's ACL, but that would be a
misfeature, as it'd break cases where users intentionally changed that
ACL.  The real fix for this aspect is Stephen Frost's work to not dump
built-in ACLs, and that's not going to get back-ported.

Per bugs #13804 and #14271.  Solution found by David Johnston and later
rediscovered by me.

Report: <dbdb368c8c2bd1b1bc2021f614d4b26172374fee@wrigleys.postgresql.org>
Report: <a5c02408fbaaef86e50e28c118642a8ba787f018@wrigleys.postgresql.org>

greenplum-db/gpdb,xinzweb/gpdb,lisakowen/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,50wu/gpdb,50wu/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,lisakowen/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,lisakowen/gpdb,50wu/gpdb,jmcatamney/gpdb,adam8157/gpdb,lisakowen/gpdb,greenplum-db/gpdb,lisakowen/gpdb,jmcatamney/gpdb,adam8157/gpdb,50wu/gpdb,50wu/gpdb,50wu/gpdb,ashwinstar/gpdb,adam8157/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,50wu/gpdb,xinzweb/gpdb,lisakowen/gpdb,lisakowen/gpdb,50wu/gpdb,adam8157/gpdb,adam8157/gpdb,adam8157/gpdb,adam8157/gpdb,xinzweb/gpdb,lisakowen/gpdb,xinzweb/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,xinzweb/gpdb,greenplum-db/gpdb,xinzweb/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,xinzweb/gpdb,xinzweb/gpdb,adam8157/gpdb,greenplum-db/gpdb