You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: postgres.rs
    path of file: ./repos/prisma-engines/libs/test-setup/src
    
    the code of the file until where you have to start completion: use crate::{runtime::run_with_thread_local_runtime as tok, AnyError, Tags};
use enumflags2::BitFlags;
use quaint::{prelude::Queryable, single::Quaint};
use url::Url;

pub(crate) fn get_postgres_tags(database_url: &str) -> Result<BitFlags<Tags>, String> {
    let fut = async {
        let quaint = Quaint::new(database_url).await.map_err(|err| err.to_string())?;
        let mut tags = Tags::Postgres.into();
        let version = quaint.version().await.map_
    
pub(crate) fn get_postgres_tags(database_url: &str) -> Result<BitFlags<Tags>, String> {
    let fut = async {
        let quaint = Quaint::new(database_url).await.map_err(|err| err.to_string())?;
        let mut tags = Tags::Postgres.into();
        let version = quaint.version().await.map_err(|err| err.to_string())?;

        match version {
            None => Ok(tags),
            Some(version) => {
                eprintln!("version: {version:?}");

                if version.contains("PostgreSQL 9") {
                    tags |= Tags::Postgres9;
                }

                if version.contains("PostgreSQL 12") {
                    tags |= Tags::Postgres12;
                }

                if version.contains("PostgreSQL 14") {
                    tags |= Tags::Postgres14;
                }

                if version.contains("PostgreSQL 15") {
                    tags |= Tags::Postgres15;
                }

                if version.contains("PostgreSQL 16") {
                    tags |= Tags::Postgres16;
                }

                if version.contains("CockroachDB") {
                    if version.contains("v23.1") {
                        tags |= Tags::CockroachDb231;
                    } else if version.contains("v22.2") {
                        tags |= Tags::CockroachDb222;
                    } else if version.contains("v21.2") {
                        tags |= Tags::CockroachDb221;
                    }

                    tags |= Tags::CockroachDb;
                }

                eprintln!("Inferred tags: {tags:?}");

                Ok(tags)
            }
        }
    };

    tok(fut)
}