Merging COGS type fix from master

--HG--
branch : 1.3
extra : source : facbba162f2dbb406095f0b04ca4f09e27db8bff
Adding in missing pg-database.sql fix

--HG--
branch : 1.3
extra : source : 86d47c8d5998d180ade6420349d65c55d485f2e1
Adding missing changelog entries

--HG--
branch : 1.3