Page MenuHomePhabricator

column "mwuser.user_name" must appear in the GROUP BY clause or be used in an aggregate function
Closed, DuplicatePublic

Description

Author: pashev.igor

Description:
Special:ActiveUsers page produces DB error with Postgresql backend:

A database query error has occurred. This may indicate a bug in the software.

Query:
SELECT user_name,user_id,COUNT(*) AS recentedits,qcc_title FROM "querycachetwo","mwuser","recentchanges" WHERE qcc_type = 'activeusers' AND qcc_namespace = '2' AND (user_name = qcc_title) AND (rc_user_text = qcc_title) AND (rc_type != '5') AND (NOT EXISTS (SELECT 1 FROM "ipblocks" WHERE (ipb_user=user_id) AND ipb_deleted = '1' )) GROUP BY qcc_title ORDER BY qcc_title LIMIT 51

Function: IndexPager::buildQueryInfo (ActiveUsersPager)

Error: 42803 ERROR: column "mwuser.user_name" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: ...::buildQueryInfo (ActiveUsersPager) 127.0.0.1 */ user_name,... ^


Version: 1.23.3
Severity: normal

Details

Reference
bz73568

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:51 AM
bzimport set Reference to bz73568.
bzimport added a subscriber: Unknown Object (MLST).

A duplicate of T70087 (which has a stalled patch waiting for review/merge)

Jdforrester-WMF subscribed.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.