@classmethod
    def drop_database(cls, database_name, default_database="postgres",
                      host="localhost", port="5432", username="", password=""):
        with psycopg2_connect(c_host=host, c_port=port, c_dbname=default_database,
                              c_user=username, c_password=password,
                              tracer=CallTracer(scope="DB._")) as conn:
            conn.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT)
            with conn.cursor() as cur:
                try:
                    cur.execute("DROP DATABASE %s" % database_name)
                    log.info("Dropped database '%s'", database_name)
                except Exception as ex:
                    raise BadRequest("Could not drop database '%s': %s" % (database_name, ex))
                # @TODO: Check whether drop was successful or timed out
                #    raise BadRequest("Could not drop database '%s'" % database_name)


    # -------------------------------------------------------------------------
    # Couch database operations
Drops a database
dataset/ETHPy150Open ooici/pyon/pyon/datastore/postgresql/base_store.py/PostgresDataStore.drop_database