In older versions of Salt (this was originally developed against 2015.2), __salt__ isn't loaded yet in the __virtual__() function. Work around this by just duplicating the check from upstream postgres.py
In older versions of Salt (this was originally developed against 2015.2), __salt__ isn't loaded yet in the __virtual__() function. Work around this by just duplicating the check from upstream postgres.py