fix: add round(double precision, integer) overload so ad-hoc queries work without ::numeric casts

This commit is contained in:
Celes Renata
2026-04-16 07:10:23 +00:00
parent 981e16a27f
commit f1e32e9186
@@ -0,0 +1,8 @@
-- Add a round(double precision, integer) overload so ad-hoc queries
-- using round(some_float, 2) work without explicit ::numeric casts.
-- PostgreSQL only provides round(numeric, integer) out of the box.
CREATE OR REPLACE FUNCTION round(double precision, integer)
RETURNS numeric AS $$
SELECT round($1::numeric, $2);
$$ LANGUAGE sql IMMUTABLE STRICT;