#460 Improve PostgreSQL datediff templates