citusdata/mongo_fdw — pull request #8 by davidcrawford (2013-04-18 18:20:24+00:00)
Title: Add support for MongoDB authentication

This commit adds support for user mappings to mongo users. This requires that you specify `use_auth 'true'` in the server options when using authentication.

The reason for adding the new `use_auth` option is that PG's GetUserMapping function throws an error if none exists. I was unable to find a way to check if a user mapping existed without throwing an error that aborts the query. So we only call GetUserMapping if the server has `use_auth 'true'`.

Look it over and let me know what you think!