Fix bugs in "restore.sql" script emitted in pg_dump tar output.
Fix bugs in "restore.sql" script emitted in pg_dump tar output.

The tar output module did some very ugly and ultimately incorrect hacking
on COPY commands to try to get them to work in the context of restoring a
deconstructed tar archive.  In particular, it would fail altogether for
table names containing any upper-case characters, since it smashed the
command string to lower-case before modifying it (and, just to add insult
to injury, did that in a way that would fail in multibyte encodings).
I don't see any particular value in being flexible about the case of the
command keywords, since the string will just have been created by
dumpTableData, so let's get rid of the whole case-folding thing.

Also, it doesn't seem to meet the POLA for the script to restore data only
in COPY mode, so add \i commands to make it have comparable behavior in
--inserts mode.

Noted while looking at the tar-output code in connection with Brian
Weaver's patch.

ovr/postgres-xl,pavanvd/postgres-xl,50wu/gpdb,ovr/postgres-xl,Postgres-XL/Postgres-XL,ashwinstar/gpdb,Postgres-XL/Postgres-XL,xinzweb/gpdb,lisakowen/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,adam8157/gpdb,xinzweb/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,jmcatamney/gpdb,lisakowen/gpdb,greenplum-db/gpdb,lisakowen/gpdb,adam8157/gpdb,lisakowen/gpdb,adam8157/gpdb,50wu/gpdb,adam8157/gpdb,50wu/gpdb,ovr/postgres-xl,techdragon/Postgres-XL,50wu/gpdb,jmcatamney/gpdb,xinzweb/gpdb,xinzweb/gpdb,adam8157/gpdb,techdragon/Postgres-XL,xinzweb/gpdb,jmcatamney/gpdb,oberstet/postgres-xl,adam8157/gpdb,Postgres-XL/Postgres-XL,lisakowen/gpdb,ovr/postgres-xl,xinzweb/gpdb,jmcatamney/gpdb,yazun/postgres-xl,techdragon/Postgres-XL,yazun/postgres-xl,xinzweb/gpdb,adam8157/gpdb,Postgres-XL/Postgres-XL,oberstet/postgres-xl,oberstet/postgres-xl,greenplum-db/gpdb,ashwinstar/gpdb,50wu/gpdb,yazun/postgres-xl,pavanvd/postgres-xl,lisakowen/gpdb,xinzweb/gpdb,zeroae/postgres-xl,zeroae/postgres-xl,50wu/gpdb,Postgres-XL/Postgres-XL,pavanvd/postgres-xl,jmcatamney/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,techdragon/Postgres-XL,adam8157/gpdb,pavanvd/postgres-xl,zeroae/postgres-xl,techdragon/Postgres-XL,ashwinstar/gpdb,zeroae/postgres-xl,oberstet/postgres-xl,ovr/postgres-xl,jmcatamney/gpdb,yazun/postgres-xl,ashwinstar/gpdb,jmcatamney/gpdb,50wu/gpdb,yazun/postgres-xl,50wu/gpdb,lisakowen/gpdb,oberstet/postgres-xl,lisakowen/gpdb,greenplum-db/gpdb,zeroae/postgres-xl,greenplum-db/gpdb