def tablespace_list(user=None, host=None, port=None, maintenance_db=None, password=None, runas=None):
 ret = {}
 query = 'SELECT spcname as "Name", pga.rolname as "Owner", spcacl as "ACL", spcoptions as "Opts", pg_tablespace_location(pgts.oid) as "Location" FROM pg_tablespace pgts, pg_roles pga WHERE pga.oid = pgts.spcowner'
 rows = __salt__['postgres.psql_query'](query, runas=runas, host=host, user=user, port=port, maintenance_db=maintenance_db, password=password)
 for row in rows:
  ret[row['Name']] = row
  ret[row['Name']].pop('Name')
 return ret

def tablespace_list ( user = None , host = None , port = None , maintenance_db = None , password = None , runas = None ) : ret = { } query = 'SELECT spcname as "Name", pga.rolname as "Owner", spcacl as "ACL", spcoptions as "Opts", pg_tablespace_location(pgts.oid) as "Location" FROM pg_tablespace pgts, pg_roles pga WHERE pga.oid = pgts.spcowner' rows = __salt__ [ 'postgres.psql_query' ] ( query , runas = runas , host = host , user = user , port = port , maintenance_db = maintenance_db , password = password ) for row in rows : ret [ row [ 'Name' ] ] = row ret [ row [ 'Name' ] ] . pop ( 'Name' ) return ret
return dictionary with information about tablespaces of a postgres server .