def available_extensions(user=None, host=None, port=None, maintenance_db=None, password=None, runas=None):
 exts = []
 query = 'select * from pg_available_extensions();'
 ret = psql_query(query, user=user, host=host, port=port, maintenance_db=maintenance_db, password=password, runas=runas)
 exts = {}
 for row in ret:
  if (('default_version' in row) and ('name' in row)):
   exts[row['name']] = row
 return exts

def available_extensions ( user = None , host = None , port = None , maintenance_db = None , password = None , runas = None ) : exts = [ ] query = 'select * from pg_available_extensions();' ret = psql_query ( query , user = user , host = host , port = port , maintenance_db = maintenance_db , password = password , runas = runas ) exts = { } for row in ret : if ( ( 'default_version' in row ) and ( 'name' in row ) ) : exts [ row [ 'name' ] ] = row return exts
list available postgresql extensions cli example: .