#NEWLINE# def version( user = None , host = None , port = None , maintenance_db = None , password = None , runas = None ) : #NEWLINE# #INDENT# "\n    Return the version of a Postgres server.\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' postgres.version\n    " #NEWLINE# query = "SELECT setting FROM pg_catalog.pg_settings WHERE name = 'server_version'" #NEWLINE# cmd = _psql_cmd ( '-c' , query , '-t' , host = host , user = user , port = port , maintenance_db = maintenance_db , password = password ) #NEWLINE# ret = _run_psql ( cmd , runas = runas , password = password , host = host , port = port , user = user ) #NEWLINE# for line in salt . utils . itertools . split ( ret [ 'stdout' ] , '\n' ) : #NEWLINE# #INDENT# return line