Bug #1: attribute name when column is type cast:
Bug #1: attribute name when column is type cast:

Given the following table:

test=# \d f
          Table "f"
 Column |  Type   | Modifiers
--------+---------+-----------
 i      | integer |
 test   | text    |

If I do the following:

test=# insert into f values(1,'test');
INSERT 139549 1
test=# select i::int8,test from f;
 ?column? | test
----------+------
        1 | test
(1 row)

It doesn't make much sense that the first column should be called
'?column?'.

The patch results in the output appearing like this:

test=# select i::int8,test from f;
 i | test
---+------
 1 | test
(1 row)

----------

Gavin Sherry

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