When rewriting an aggregate introduced into WHERE, allow agg argument to be an expression not just a simple Var, so long as only one table is referenced (so that code isn't really any more difficult than before). This whole thing is still fundamentally bogus, but at least we can accept a few more cases than before.
When rewriting an aggregate introduced into WHERE, allow agg argument to
be an expression not just a simple Var, so long as only one table is
referenced (so that code isn't really any more difficult than before).
This whole thing is still fundamentally bogus, but at least we can accept
a few more cases than before.

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