saltstack/salt — pull request #2919 by slafs (2012-12-16 21:07:06+00:00)
Title: db_list now runs a query instead of `psql -l`

this should fix #2866

I've made a change so that `db_list` runs a query instead of depending on `psql -l` results. This way it's locale independent.

The code is borrowed from `user_list` function.

This fix should be backwards compatible as it should return the same structure as before (assuming english key names). So everything that depended on `db_list` should also work.

Would be great to have some unit tests regarding postgres module.