﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24767	Add GREATEST and LEAST Query Expressions	Ian Foote	Ian Foote	"Postgres supports [http://www.postgresql.org/docs/current/static/functions-conditional.html#FUNCTIONS-GREATEST-LEAST GREATEST and LEAST] query expressions. These could easily be implemented in django by subclassing the [https://github.com/django/django/blob/master/django/db/models/functions.py#L8-L29 Coalesce] query expression and changing the `function` attribute to `'GREATEST'` or `'LEAST'` respectively.

I'm not sure which other databases support this, so perhaps this can only be added to `contrib.postgres`.

If this isn't appropriate for core, I'm happy to create a small PyPI package instead."	New feature	closed	Database layer (models, ORM)	dev	Normal	fixed			Accepted	0	0	0	0	0	0
