This patch should fix the problem. Doesn't include my previous patch for repeat(). Again, somewhat off-the-cuff, so I might have missed something...
This patch should fix the problem. Doesn't include my previous patch
for repeat(). Again, somewhat off-the-cuff, so I might have missed
something...

test=# select lpad('xxxxx',1431655765,'yyyyyyyyyyyyyyyy');
ERROR:  Requested length too large
test=# select rpad('xxxxx',1431655765,'yyyyyyyyyyyyyyyy');
ERROR:  Requested length too large

(That's on a Unicode DB, haven't tested other encodings but AFAICT
this fix should still work.)

Neil Conway

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