Page MenuHomePhabricator

DISTINCTROW with Postgres
Closed, ResolvedPublic


Author: mguerra13

When trying to execute one of the maintenance scripts, it fails because it was sending a query with the reserved word "DISTINCTROW" to the Postgres database server of my installation. Postgres does not support this word.

The scrip:
..../maintenance$ php deleteOldRevisions.php --delete 76

The error is on the query:

SELECT DISTINCTROW rev_text_id FROM revision

The workaround:

Edit the file, in the lines 23 and 31, replacing the text "DISTINCTROW" with "DISTINCT"


Doing a little search it appears that "DISTINCTROW" is not standard SQL.
I suggest replacing all references to "DISTINCTROW" to "DISTINCT" in futures releases of MediaWiki.

Version: 1.15.x
Severity: minor



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 21 2014, 10:40 PM
bzimport added a project: Wikimedia-Rdbms.
bzimport set Reference to bz19160.
bzimport added a subscriber: Unknown Object (MLST).

Fixed in r51858. That appears to be the only use of DISTINCTROW.

Jdforrester-WMF added a subscriber: Jdforrester-WMF.

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