﻿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
18016	Add support for grouping by primary key for PostgreSQL 9.1+	Anssi Kääriäinen	nobody	"PostgreSQL supports grouping by primary keys in 9.1+ [http://www.postgresql.org/docs/9.1/static/release-9-1.html#AEN107457]. While MySQL has a similar feature, the PostgreSQL behavior is a little different. In MySQL it is enough to add one primary key into the group by, in PostgreSQL every table having column in SELECT or ORDER BY will need to have its PK added to the GROUP BY. 

Supporting this needs some changes in the ORM, as the information which columns are primary keys isn't currently easily available. The benefit is faster query plans, as grouping by a large text field for example is very inefficient."	Cleanup/optimization	closed	Database layer (models, ORM)	1.4	Normal	duplicate			Accepted	0	0	0	0	0	0
