Seaquel
PostgreSQL error code

PostgreSQL error 42725

42725 is the SQLSTATE PostgreSQL reports for ambiguous function, in class 42, Syntax Error or Access Rule Violation.

SQLSTATE42725
Condition nameambiguous_function
Class42 — Syntax Error or Access Rule Violation

Reproduce it, then fix it

Both versions of discount() take an integer and a numeric, in opposite orders, and two integer literals fit either one equally well. Cast an argument so only one matches. Run the broken query to see the error, then switch to the fixed one. Edit either freely; every run is rolled back.

SELECT discount(3, 20);
SELECT discount(3, 20::numeric);

Source: PostgreSQL documentation, Appendix A