mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-04 18:23:05 +00:00
Adds the division-by-zero divergence class to the PG-compat review tooling: on a divisor that the data can drive to 0 (e.g. Sum(a)/Sum(b)), MariaDB returns NULL for division by zero while PostgreSQL raises `division by zero` and aborts the query. The portable fix is to wrap the divisor in NullIf(divisor, 0), which yields NULL on both engines (matching MariaDB). - .greptile/config.json: add it to the "would ERROR on PostgreSQL" list. - .github/POSTGRES_COMPATIBILITY.md: document it under §1 (hard breaks). - .github/helper/postgres_compat.py: note it in the docstring as a deliberately-not-statically-checked semantic divergence (data-dependent, like integer-division intent), so it stays a reviewer/Greptile concern. Tooling-only; no source query changes. The instance fix shipped in #56361.