[postgres] fix: pg8000 wasn't doing a good job with multiple relations in list.
[postgres] fix: pg8000 wasn't doing a good job with multiple relations in list.

[postgres] another query to fix.

[postgres] use iterkeys() to iterate more efficiently.

pmav99/praktoras,takus/dd-agent,mderomph-coolblue/dd-agent,amalakar/dd-agent,gphat/dd-agent,jyogi/purvar-agent,lookout/dd-agent,takus/dd-agent,gphat/dd-agent,Mashape/dd-agent,c960657/dd-agent,indeedops/dd-agent,Mashape/dd-agent,lookout/dd-agent,huhongbo/dd-agent,huhongbo/dd-agent,huhongbo/dd-agent,mderomph-coolblue/dd-agent,pmav99/praktoras,brettlangdon/dd-agent,gphat/dd-agent,tebriel/dd-agent,brettlangdon/dd-agent,huhongbo/dd-agent,takus/dd-agent,amalakar/dd-agent,Mashape/dd-agent,Wattpad/dd-agent,lookout/dd-agent,Wattpad/dd-agent,manolama/dd-agent,Wattpad/dd-agent,amalakar/dd-agent,indeedops/dd-agent,tebriel/dd-agent,manolama/dd-agent,cberry777/dd-agent,urosgruber/dd-agent,jyogi/purvar-agent,amalakar/dd-agent,Mashape/dd-agent,urosgruber/dd-agent,gphat/dd-agent,mderomph-coolblue/dd-agent,jyogi/purvar-agent,Wattpad/dd-agent,mderomph-coolblue/dd-agent,pmav99/praktoras,tebriel/dd-agent,indeedops/dd-agent,pmav99/praktoras,urosgruber/dd-agent,c960657/dd-agent,pmav99/praktoras,tebriel/dd-agent,brettlangdon/dd-agent,jyogi/purvar-agent,takus/dd-agent,tebriel/dd-agent,lookout/dd-agent,gphat/dd-agent,urosgruber/dd-agent,manolama/dd-agent,c960657/dd-agent,Wattpad/dd-agent,urosgruber/dd-agent,cberry777/dd-agent,lookout/dd-agent,c960657/dd-agent,cberry777/dd-agent,manolama/dd-agent,cberry777/dd-agent,indeedops/dd-agent,indeedops/dd-agent,manolama/dd-agent,takus/dd-agent,huhongbo/dd-agent,brettlangdon/dd-agent,c960657/dd-agent,amalakar/dd-agent,cberry777/dd-agent,Mashape/dd-agent,mderomph-coolblue/dd-agent,brettlangdon/dd-agent,jyogi/purvar-agent