#NEWLINE# def schema_get( dbname , name , db_user = None , db_password = None , db_host = None , db_port = None ) : #NEWLINE# #INDENT# "\n    Return a dict with information about schemas in a database.\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' postgres.schema_get dbname name\n\n    dbname\n        Database name we query on\n\n    name\n       Schema name we look for\n\n    db_user\n        database username if different from config or default\n\n    db_password\n        user password if any password for a specified user\n\n    db_host\n        Database host if different from config or default\n\n    db_port\n        Database port if different from config or default\n    " #NEWLINE# all_schemas = schema_list ( dbname , db_user = db_port , db_host = db_host , db_port = db_port , db_password = db_password ) #NEWLINE# try : #NEWLINE# #INDENT# return all_schemas . get ( name , None ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# log . error ( 'Could not retrieve Postgres schema. Is Postgres running?' ) #NEWLINE# return False