Last modified: 2010-05-15 15:50:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T12763, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10763 - Adding multiple categories to an article fails when using PostgreSQL 8.1
Adding multiple categories to an article fails when using PostgreSQL 8.1
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Categories (Other open bugs)
1.10.x
PC Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-31 20:25 UTC by Paul Kopacz
Modified: 2010-05-15 15:50 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Paul Kopacz 2007-07-31 20:25:21 UTC
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.
Comment 1 Greg Sabino Mullane 2007-08-09 17:35:05 UTC
That's the best way - that should have been a 8.2 all along. Thanks for the report, this has been fixed in r24702.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links