Fix an ancient oversight in change_varattnos_of_a_node: it neglected to update varoattno along with varattno.  This resulted in having Vars that were not seen as equal(), causing inheritance of the "same" constraint from different parent relations to fail.  An example is
Fix an ancient oversight in change_varattnos_of_a_node: it neglected to update
varoattno along with varattno.  This resulted in having Vars that were not
seen as equal(), causing inheritance of the "same" constraint from different
parent relations to fail.  An example is

create table pp1 (f1 int check (f1>0));
create table cc1 (f2 text, f3 int) inherits (pp1);
create table cc2(f4 float) inherits(pp1,cc1);

Backpatch as far as 7.4.  (The test case still fails in 7.4, for reasons
that I don't feel like investigating at the moment.)

This is a backpatch commit only.  The fix will be applied in HEAD as part
of the upcoming pg_constraint patch.

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