Dit is gemakkelijk opnieuw te implementeren in PostgreSQL door alleen SQL-functies te gebruiken om op te ruimen wat je al hebt:
create function months_of(interval)
returns int strict immutable language sql as $$
select extract(years from $1)::int * 12 + extract(month from $1)::int
$$;
create function months_between(date, date)
returns int strict immutable language sql as $$
select abs(months_of(age($1, $2)))
$$;
En nu select months_between('1978-06-20', '2011-12-09')
produceert 401.