Fix planning of SubLinks to ensure that Vars generated from transformation of a sublink's test expression have the correct vartypmod, rather than defaulting to -1.  There's at least one place where this is important because we're expecting these Vars to be exactly equal() to those appearing in the subplan itself.  This is a pretty klugy solution --- it would likely be cleaner to change Param nodes to include a typmod field --- but we can't do that in the already-released 8.2 branch. Per bug report from Hubert Fongarnand.
Fix planning of SubLinks to ensure that Vars generated from transformation of
a sublink's test expression have the correct vartypmod, rather than defaulting
to -1.  There's at least one place where this is important because we're
expecting these Vars to be exactly equal() to those appearing in the subplan
itself.  This is a pretty klugy solution --- it would likely be cleaner to
change Param nodes to include a typmod field --- but we can't do that in the
already-released 8.2 branch.
Per bug report from Hubert Fongarnand.

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