Hi,
PFA patch to fix the issue where column order in Primary Key/Indexconstraints was maintained while creating sql from template.RM#1842
--Regards,Murtuza ZabuawalaEnterpriseDB: http://www.enterprisedb.comThe Enterprise PostgreSQL Company