mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-11 05:31:48 +00:00
The whole-repo MariaDB<->PostgreSQL audits surfaced classes the checker and review guide did not yet cover. Add them: Static checker (.github/helper/postgres_compat.py) - new mechanical breaks: - .rlike() / raw RLIKE: frappe rewrites REGEXP->~* on Postgres but NOT RLIKE. - Cast(x, "char") / raw CAST AS CHAR: bare CHAR is character(1) on Postgres and truncates multi-digit values; use "varchar". (Both flag zero production code; the only repo hit is in patches/, which the hook already excludes.) Greptile config + POSTGRES_COMPATIBILITY.md - new semantic/hard classes: - aggregate (Sum/Count) selected next to bare columns with no GROUP BY at all. - .like()/LIKE on a non-text column (bigint ILIKE) -> Cast_ to varchar. - get_all(fields=["CapitalCase"]) identifier-case (extends the get_value case). - bool into a Check column via qb.update().set() (extends set_value/db_set). - int/int division: float a literal (col/1440 -> col/1440.0). - Concat over a nullable column leaking a bare prefix on Postgres. - clarify REGEXP/.regexp() is translated but RLIKE/.rlike() is not.