Be more careful to check input string lengths as well as values  when deciding whether a field is a year field.  Assume *anything* longer  than 2 digits (if it isn't a special-case doy) is a valid year.  This should fix the "Y1K" and "Y10K" problems   pointed out by Massimo recently. Check usage of BC to require a positive-valued year; before just used it  to flip the sign of the year without checking. This led to problems  near year zero. Allow a 5 digit "concatenated date" of 2 digit year plus day of year. Do 2->4 digit year correction for 6 and 5 digit "concatenated dates".  Somehow forgot this originally. Guess not many folks use it...
Be more careful to check input string lengths as well as values
 when deciding whether a field is a year field.  Assume *anything* longer
 than 2 digits (if it isn't a special-case doy) is a valid year.
 This should fix the "Y1K" and "Y10K" problems
  pointed out by Massimo recently.
Check usage of BC to require a positive-valued year; before just used it
 to flip the sign of the year without checking. This led to problems
 near year zero.
Allow a 5 digit "concatenated date" of 2 digit year plus day of year.
Do 2->4 digit year correction for 6 and 5 digit "concatenated dates".
 Somehow forgot this originally. Guess not many folks use it...

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