https://bugzilla.wikimedia.org/show_bug.cgi?id=42659

--- Comment #16 from José Antonio <[email protected]> ---
Summary of changes that seems to make SMW work with PostgreSQL 9.1 on Debian
Wheezy using  “php ./SMW_setup.php”.


Change n.1 to solve problem: name “relation "smw_object_ids" already exists”


$noindexname="";
$db->query( "CREATE $type $noindexname ON $tableName USING btree($columns)",
__METHOD__ );

to lines 494-495 in  SemanticMediaWiki/includes/storage/SMW_SQLHelpers.php

Changes in patch provided by b42 solves this problem as well. But postgres will
manage index name generation if not name is provided. This seems less complex.



Change n.2 To solve: relation "smw_ids_smw_id_seq" does not exist

“smw_ids_smw_id_seq”  renamed as  “smw_object_ids_smw_id_seq” in

SemanticMediaWiki/includes/storage/SQLStore/SMW_Sql3SmwIds.php.

Thanks to  “Comment #14 from Marcin Cieślak”

Changes in path provided by b42 solve this problem. But following on “Comment
#14 from Marcin Cieślak” it seems that renaming  will make it consistent with
the table name, easier to follow.


Change n.3 To solve:  ERROR:  syntax error at or near ")"
 ...refreshPropertyStatistics  */ FROM "smw_prop_stats" WHERE  )

As per mediawiki-1.21.3/includes/db/Database.php docs second parameter is an
array. Therefore  'p_id' is changed to array('p_id').

In line 127 of  the file: 
SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3_SetupHandlers.php 

After the changes it will be as follows.

$dbw->replace(
                SMWSQLStore3::PROPERTY_STATISTICS_TABLE,
                array ('p_id'),
                array (
                    'p_id' => $row->smw_id,
                    'usage_count' => $usageCount
                ),
                __METHOD__
            );

This is the same change as in b42 patch.

(System  used is Debian 7; SMP Debian 3.10.11-1~bpo70+1 (2013-09-24) x86_64 
 working in SMW: With mediawiki-1.21.3 downloaded from mediawiki.)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to