Returns a tuple of (user, host, port, db) with config, pillar, or default
    values assigned to missing values.

def _connection_defaults(user=None, host=None, port=None, maintenance_db=None):
    '''
    Returns a tuple of (user, host, port, db) with config, pillar, or default
    values assigned to missing values.
    '''
    if not user:
        user = __salt__['config.option']('postgres.user')
    if not host:
        host = __salt__['config.option']('postgres.host')
    if not port:
        port = __salt__['config.option']('postgres.port')
    if not maintenance_db:
        maintenance_db = __salt__['config.option']('postgres.maintenance_db')

    return (user, host, port, maintenance_db)