Page MenuHomePhabricator

Adding multiple categories to an article fails when using PostgreSQL 8.1
Closed, ResolvedPublic


Author: pkopacz

In MySQL a statement like this is legal: INSERT INTO table VALUES (data1, data2),(data3, date4),...
This inserts multiple rows at a time. However, in PostgreSQL, you cannot insert multiple rows in one SELECT statement. So, adding the article to one category at a time works, but adding to multiple categories at a time attempts to use an SQL statement which errors (under PostgreSQL).
My co-worker fixed it this way:
In file includes/DatabasePostgres.php
Line 1190
if ( $wgDBversion >= 8.1 ) {
changed to
if ( $wgDBversion >= 8.2 ) {

We're not sure if this is the best way, but it works for us.

Version: 1.10.x
Severity: normal
OS: Linux
Platform: PC



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:49 PM
bzimport set Reference to bz10763.
bzimport added a subscriber: Unknown Object (MLST).

That's the best way - that should have been a 8.2 all along. Thanks for the report, this has been fixed in r24702.