79085809

Date: 2024-10-14 10:45:25
Score: 1
Natty:
Report link

Something that reconcile solutions of both Daniels :-) Little more elegant.

CREATE FUNCTION abs(interval) RETURNS interval AS
  $$ SELECT GREATEST(-$1,$1); $$
LANGUAGE sql immutable;
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Tomek Cwajda