Make CREATE AGGREGATE complain if the initcond is invalid for the datatype.
Make CREATE AGGREGATE complain if the initcond is invalid for the datatype.

The initial transition value is stored as a text string and not fed to the
transition type's input function until runtime (so that values such as
"now" don't get frozen at creation time).  Previously, CREATE AGGREGATE
didn't do anything with it but that, which meant that even erroneous values
would be accepted and not complained of until the aggregate is used.  This
seems unhelpful, and it's confused at least one user, as in Rhys Stewart's
recent report.  It seems worth taking a few more cycles to invoke the input
function and verify that the value is acceptable.  We can't do this if the
transition type is polymorphic, but in normal aggregates we know the actual
transition type so we can call the right input function.

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