Fixes for \encoding command. 	1) freeing null pointer 	2) invalid encoding info may be stored into psql variable 	3) fix indentation
Fixes for \encoding command.
	1) freeing null pointer
	2) invalid encoding info may be stored into psql variable
	3) fix indentation

xinzweb/gpdb,oberstet/postgres-xl,rubikloud/gpdb,randomtask1155/gpdb,greenplum-db/gpdb,postmind-net/postgres-xl,tangp3/gpdb,cjcjameson/gpdb,edespino/gpdb,zaksoup/gpdb,tangp3/gpdb,foyzur/gpdb,pavanvd/postgres-xl,Postgres-XL/Postgres-XL,techdragon/Postgres-XL,zeroae/postgres-xl,cjcjameson/gpdb,techdragon/Postgres-XL,kaknikhil/gpdb,Quikling/gpdb,foyzur/gpdb,foyzur/gpdb,cjcjameson/gpdb,foyzur/gpdb,edespino/gpdb,kaknikhil/gpdb,xuegang/gpdb,kaknikhil/gpdb,adam8157/gpdb,Chibin/gpdb,arcivanov/postgres-xl,yuanzhao/gpdb,adam8157/gpdb,lisakowen/gpdb,tangp3/gpdb,royc1/gpdb,atris/gpdb,CraigHarris/gpdb,arcivanov/postgres-xl,cjcjameson/gpdb,Postgres-XL/Postgres-XL,zaksoup/gpdb,ahachete/gpdb,janebeckman/gpdb,arcivanov/postgres-xl,randomtask1155/gpdb,zaksoup/gpdb,janebeckman/gpdb,edespino/gpdb,lpetrov-pivotal/gpdb,Chibin/gpdb,xinzweb/gpdb,snaga/postgres-xl,randomtask1155/gpdb,tpostgres-projects/tPostgres,ashwinstar/gpdb,lisakowen/gpdb,edespino/gpdb,greenplum-db/gpdb,randomtask1155/gpdb,rvs/gpdb,kaknikhil/gpdb,lisakowen/gpdb,jmcatamney/gpdb,ovr/postgres-xl,yazun/postgres-xl,Chibin/gpdb,rvs/gpdb,jmcatamney/gpdb,janebeckman/gpdb,ahachete/gpdb,rvs/gpdb,edespino/gpdb,xuegang/gpdb,tangp3/gpdb,foyzur/gpdb,lintzc/gpdb,Quikling/gpdb,tangp3/gpdb,ashwinstar/gpdb,lpetrov-pivotal/gpdb,lintzc/gpdb,jmcatamney/gpdb,kaknikhil/gpdb,atris/gpdb,oberstet/postgres-xl,edespino/gpdb,techdragon/Postgres-XL,yuanzhao/gpdb,greenplum-db/gpdb,lintzc/gpdb,greenplum-db/gpdb,ahachete/gpdb,pavanvd/postgres-xl,royc1/gpdb,xuegang/gpdb,arcivanov/postgres-xl,postmind-net/postgres-xl,yuanzhao/gpdb,0x0FFF/gpdb,janebeckman/gpdb,edespino/gpdb,50wu/gpdb,ovr/postgres-xl,foyzur/gpdb,Chibin/gpdb,greenplum-db/gpdb,snaga/postgres-xl,atris/gpdb,janebeckman/gpdb,atris/gpdb,yuanzhao/gpdb,adam8157/gpdb,Quikling/gpdb,0x0FFF/gpdb,lisakowen/gpdb,50wu/gpdb,ovr/postgres-xl,CraigHarris/gpdb,lpetrov-pivotal/gpdb,Quikling/gpdb,rvs/gpdb,chrishajas/gpdb,xinzweb/gpdb,pavanvd/postgres-xl,zeroae/postgres-xl,jmcatamney/gpdb,arcivanov/postgres-xl,lisakowen/gpdb,lisakowen/gpdb,xuegang/gpdb,kaknikhil/gpdb,rvs/gpdb,zaksoup/gpdb,jmcatamney/gpdb,Chibin/gpdb,CraigHarris/gpdb,zaksoup/gpdb,adam8157/gpdb,tpostgres-projects/tPostgres,randomtask1155/gpdb,atris/gpdb,foyzur/gpdb,cjcjameson/gpdb,xinzweb/gpdb,CraigHarris/gpdb,pavanvd/postgres-xl,rvs/gpdb,pavanvd/postgres-xl,ahachete/gpdb,lintzc/gpdb,cjcjameson/gpdb,ovr/postgres-xl,greenplum-db/gpdb,CraigHarris/gpdb,lintzc/gpdb,tangp3/gpdb,tpostgres-projects/tPostgres,kaknikhil/gpdb,zaksoup/gpdb,tpostgres-projects/tPostgres,50wu/gpdb,rvs/gpdb,Postgres-XL/Postgres-XL,foyzur/gpdb,ovr/postgres-xl,xuegang/gpdb,Quikling/gpdb,xuegang/gpdb,tangp3/gpdb,randomtask1155/gpdb,cjcjameson/gpdb,atris/gpdb,Chibin/gpdb,arcivanov/postgres-xl,yuanzhao/gpdb,atris/gpdb,zaksoup/gpdb,rvs/gpdb,postmind-net/postgres-xl,randomtask1155/gpdb,kmjungersen/PostgresXL,lpetrov-pivotal/gpdb,0x0FFF/gpdb,jmcatamney/gpdb,50wu/gpdb,kmjungersen/PostgresXL,ashwinstar/gpdb,lisakowen/gpdb,adam8157/gpdb,zeroae/postgres-xl,CraigHarris/gpdb,lpetrov-pivotal/gpdb,snaga/postgres-xl,postmind-net/postgres-xl,edespino/gpdb,janebeckman/gpdb,kaknikhil/gpdb,lpetrov-pivotal/gpdb,Postgres-XL/Postgres-XL,adam8157/gpdb,janebeckman/gpdb,rubikloud/gpdb,tangp3/gpdb,janebeckman/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,adam8157/gpdb,lpetrov-pivotal/gpdb,yuanzhao/gpdb,lintzc/gpdb,zeroae/postgres-xl,greenplum-db/gpdb,rubikloud/gpdb,royc1/gpdb,lintzc/gpdb,royc1/gpdb,Quikling/gpdb,yuanzhao/gpdb,ahachete/gpdb,kmjungersen/PostgresXL,xinzweb/gpdb,xinzweb/gpdb,oberstet/postgres-xl,ashwinstar/gpdb,chrishajas/gpdb,cjcjameson/gpdb,chrishajas/gpdb,chrishajas/gpdb,xuegang/gpdb,kmjungersen/PostgresXL,xinzweb/gpdb,Chibin/gpdb,chrishajas/gpdb,chrishajas/gpdb,greenplum-db/gpdb,cjcjameson/gpdb,lpetrov-pivotal/gpdb,ahachete/gpdb,CraigHarris/gpdb,lintzc/gpdb,ahachete/gpdb,0x0FFF/gpdb,techdragon/Postgres-XL,snaga/postgres-xl,CraigHarris/gpdb,Quikling/gpdb,yuanzhao/gpdb,royc1/gpdb,rvs/gpdb,Chibin/gpdb,50wu/gpdb,yazun/postgres-xl,50wu/gpdb,ashwinstar/gpdb,kaknikhil/gpdb,xuegang/gpdb,snaga/postgres-xl,edespino/gpdb,yazun/postgres-xl,Quikling/gpdb,royc1/gpdb,kmjungersen/PostgresXL,0x0FFF/gpdb,Postgres-XL/Postgres-XL,zaksoup/gpdb,rubikloud/gpdb,chrishajas/gpdb,royc1/gpdb,50wu/gpdb,Quikling/gpdb,rvs/gpdb,jmcatamney/gpdb,rubikloud/gpdb,oberstet/postgres-xl,0x0FFF/gpdb,jmcatamney/gpdb,royc1/gpdb,postmind-net/postgres-xl,50wu/gpdb,Quikling/gpdb,oberstet/postgres-xl,kaknikhil/gpdb,randomtask1155/gpdb,xuegang/gpdb,tpostgres-projects/tPostgres,adam8157/gpdb,rubikloud/gpdb,Chibin/gpdb,atris/gpdb,0x0FFF/gpdb,janebeckman/gpdb,yazun/postgres-xl,yuanzhao/gpdb,xinzweb/gpdb,zeroae/postgres-xl,0x0FFF/gpdb,chrishajas/gpdb,techdragon/Postgres-XL,rubikloud/gpdb,rubikloud/gpdb,edespino/gpdb,cjcjameson/gpdb,ahachete/gpdb,Chibin/gpdb,lintzc/gpdb,yuanzhao/gpdb,ashwinstar/gpdb,yazun/postgres-xl,janebeckman/gpdb,CraigHarris/gpdb,lisakowen/gpdb