When checking for datetime field overflow, we should allow a fractional-second part that rounds up to exactly 1.0 second.  The previous coding rejected input like "00:12:57.9999999999999999999999999999", with the exact number of nines needed to cause failure varying depending on float-timestamp option and possibly on platform.  Obviously this should round up to the next integral second, if we don't have enough precision to distinguish the value from that. Per bug #4789 from Robert Kruus.
When checking for datetime field overflow, we should allow a fractional-second
part that rounds up to exactly 1.0 second.  The previous coding rejected input
like "00:12:57.9999999999999999999999999999", with the exact number of nines
needed to cause failure varying depending on float-timestamp option and
possibly on platform.  Obviously this should round up to the next integral
second, if we don't have enough precision to distinguish the value from that.
Per bug #4789 from Robert Kruus.

In passing, fix a missed check for fractional seconds in one copy of the
"is it greater than 24:00:00" code.

Broken all the way back, so patch all the way back.

kaknikhil/gpdb,rvs/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,lintzc/gpdb,50wu/gpdb,janebeckman/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,CraigHarris/gpdb,xinzweb/gpdb,yuanzhao/gpdb,lisakowen/gpdb,cjcjameson/gpdb,cjcjameson/gpdb,ashwinstar/gpdb,zaksoup/gpdb,jmcatamney/gpdb,kaknikhil/gpdb,jmcatamney/gpdb,cjcjameson/gpdb,cjcjameson/gpdb,adam8157/gpdb,rvs/gpdb,xuegang/gpdb,lisakowen/gpdb,50wu/gpdb,0x0FFF/gpdb,kaknikhil/gpdb,ahachete/gpdb,rvs/gpdb,edespino/gpdb,chrishajas/gpdb,adam8157/gpdb,chrishajas/gpdb,CraigHarris/gpdb,50wu/gpdb,Chibin/gpdb,janebeckman/gpdb,Chibin/gpdb,lintzc/gpdb,50wu/gpdb,Quikling/gpdb,xinzweb/gpdb,rvs/gpdb,lisakowen/gpdb,kaknikhil/gpdb,ahachete/gpdb,royc1/gpdb,zaksoup/gpdb,50wu/gpdb,chrishajas/gpdb,edespino/gpdb,0x0FFF/gpdb,cjcjameson/gpdb,ashwinstar/gpdb,lisakowen/gpdb,janebeckman/gpdb,xinzweb/gpdb,xuegang/gpdb,cjcjameson/gpdb,xuegang/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,lisakowen/gpdb,edespino/gpdb,jmcatamney/gpdb,lisakowen/gpdb,edespino/gpdb,xuegang/gpdb,ashwinstar/gpdb,lintzc/gpdb,yuanzhao/gpdb,janebeckman/gpdb,edespino/gpdb,zaksoup/gpdb,Chibin/gpdb,zaksoup/gpdb,Chibin/gpdb,janebeckman/gpdb,ahachete/gpdb,jmcatamney/gpdb,janebeckman/gpdb,edespino/gpdb,greenplum-db/gpdb,zaksoup/gpdb,0x0FFF/gpdb,CraigHarris/gpdb,chrishajas/gpdb,kaknikhil/gpdb,greenplum-db/gpdb,rvs/gpdb,Quikling/gpdb,CraigHarris/gpdb,xinzweb/gpdb,Chibin/gpdb,50wu/gpdb,royc1/gpdb,xinzweb/gpdb,Chibin/gpdb,kaknikhil/gpdb,lintzc/gpdb,Quikling/gpdb,kaknikhil/gpdb,Quikling/gpdb,50wu/gpdb,lintzc/gpdb,zaksoup/gpdb,Chibin/gpdb,chrishajas/gpdb,kaknikhil/gpdb,adam8157/gpdb,xuegang/gpdb,lisakowen/gpdb,edespino/gpdb,Quikling/gpdb,chrishajas/gpdb,Chibin/gpdb,rvs/gpdb,zaksoup/gpdb,rvs/gpdb,Chibin/gpdb,greenplum-db/gpdb,0x0FFF/gpdb,adam8157/gpdb,xuegang/gpdb,royc1/gpdb,CraigHarris/gpdb,0x0FFF/gpdb,adam8157/gpdb,janebeckman/gpdb,lisakowen/gpdb,cjcjameson/gpdb,ashwinstar/gpdb,janebeckman/gpdb,lintzc/gpdb,xuegang/gpdb,chrishajas/gpdb,CraigHarris/gpdb,jmcatamney/gpdb,adam8157/gpdb,greenplum-db/gpdb,rvs/gpdb,jmcatamney/gpdb,kaknikhil/gpdb,0x0FFF/gpdb,50wu/gpdb,Quikling/gpdb,edespino/gpdb,Quikling/gpdb,Quikling/gpdb,rvs/gpdb,chrishajas/gpdb,ashwinstar/gpdb,zaksoup/gpdb,royc1/gpdb,jmcatamney/gpdb,royc1/gpdb,xinzweb/gpdb,CraigHarris/gpdb,Chibin/gpdb,yuanzhao/gpdb,janebeckman/gpdb,greenplum-db/gpdb,edespino/gpdb,ashwinstar/gpdb,adam8157/gpdb,ahachete/gpdb,jmcatamney/gpdb,royc1/gpdb,CraigHarris/gpdb,ahachete/gpdb,lintzc/gpdb,Quikling/gpdb,adam8157/gpdb,greenplum-db/gpdb,yuanzhao/gpdb,xinzweb/gpdb,royc1/gpdb,kaknikhil/gpdb,CraigHarris/gpdb,0x0FFF/gpdb,lintzc/gpdb,0x0FFF/gpdb,yuanzhao/gpdb,ahachete/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,janebeckman/gpdb,xinzweb/gpdb,ahachete/gpdb,yuanzhao/gpdb,xuegang/gpdb,ahachete/gpdb,royc1/gpdb,xuegang/gpdb,Quikling/gpdb,cjcjameson/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,rvs/gpdb,edespino/gpdb,lintzc/gpdb