{
  "id": "python/sqlalchemy-exc-unsupported-compilation-error",
  "signature": "sqlalchemy.exc.CompileError: Cannot compile MySQL statement for PostgreSQL dialect",
  "signature_zh": "无法为 PostgreSQL 方言编译 MySQL 语句",
  "regex": "sqlalchemy\\.exc\\.CompileError:\\ Cannot\\ compile\\ MySQL\\ statement\\ for\\ PostgreSQL\\ dialect",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "Using database-specific SQL constructs (e.g., MySQL functions) with a different database backend that does not support them.",
  "root_cause_type": "generic",
  "root_cause_zh": "使用了特定于数据库的 SQL 构造（例如 MySQL 函数），但后端数据库不支持。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Changing dialect only",
      "why_fails": "",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using raw SQL blindly",
      "why_fails": "",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use generic SQLAlchemy functions",
      "success_rate": 0.9,
      "how": "Use SQLAlchemy's generic functions like func.now() instead of MySQL-specific NOW().",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use compatible backend",
      "success_rate": 0.85,
      "how": "Switch to a compatible database backend or use database-specific dialects with proper abstraction.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.81,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-08-30",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}