static struct md_container *init_db_attrs(url_t *u) {
    struct md_container *mdc = NULL;
    if (conf->db_attrs) {
        switch (u->type) {
            case url_stdin:
            case url_stdout:
            case url_stderr:
            case url_fd:
            case url_file:
            case url_http:
            case url_https:
            case url_ftp: {
                mdc = checked_malloc(sizeof(struct md_container)); /* freed in close_db_attrs */
                mdc->todo_attr = conf->db_attrs;

                int length = snprintf(NULL, 0, "%s:%s", get_url_type_string(u->type), u->value) + 1;
                char *str = checked_malloc(length * sizeof(char));
                snprintf(str, length, "%s:%s", get_url_type_string(u->type), u->value);
                init_md(mdc, str);
                free(str);

                break;
            }
            /* unsupported database types */
            case url_syslog: {
                /* do nothing */
                break;
            }
        }
    }
    return mdc;
}
static struct md_container *init_db_attrs(url_t *u) {
    struct md_container *mdc = NULL;
    if (conf->db_attrs) {
        switch (u->type) {
            case url_stdin:
            case url_stdout:
            case url_stderr:
            case url_fd:
            case url_file:
            case url_http:
            case url_https:
            case url_ftp: {
                mdc = checked_malloc(sizeof(struct md_container));  
                mdc->todo_attr = conf->db_attrs;

                int length = snprintf(NULL, 0, "%s:%s", get_url_type_string(u->type), u->value) + 1;
                char *str = checked_malloc(length * sizeof(char));
                snprintf(str, length, "%s:%s", get_url_type_string(u->type), u->value);
                init_md(mdc, str);
                free(str);

                break;
            }
             
            case url_syslog: {
                 
                break;
            }
        }
    }
    return mdc;
}