Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDisallowDatabaseConnectionsSQL PHP Method

getDisallowDatabaseConnectionsSQL() public method

This is useful to force DROP DATABASE operations which could fail because of active connections.
public getDisallowDatabaseConnectionsSQL ( string $database ) : string
$database string The name of the database to disallow new connections for.
return string
    public function getDisallowDatabaseConnectionsSQL($database)
    {
        return "UPDATE pg_database SET datallowconn = 'false' WHERE datname = '{$database}'";
    }
PostgreSqlPlatform