https://bugzilla.wikimedia.org/show_bug.cgi?id=42659
--- Comment #15 from José Antonio <[email protected]> --- Uising "php ./SMW_setup.php", These are my findings so far: Initial Problem: relation already exists: File: SemanticMediaWiki/includes/storage/SMW_SQLHelpers.php Supplied index name is the same the table name causing the whole postgres data base creation for SMW. to fail. if ( $db->indexInfo( $tableName, $indexName ) === false ) { $db->query( "CREATE $type $tableName ON $tableName USING btree($columns)", __METHOD__ ); } However original parameter: $indexName, seems to be processed into a name that it is the same that the table name, causing the whole postgres data base creation for SMW. to fail. Assigning a null string value to the index name value, causes postgres to generate a valid index name. Then tables seems to be created correctly. $noindexname=""; $db->query( "CREATE $type $noindexname ON $tableName USING btree($columns)", __METHOD__ ); However post creation db update fails. Function public static function setupIndex( $rawTableName, array $indexes, $db, $reportTo = null ) suplied index name is the same that table BY: public static function setupIndex( $rawTableName, array $indexes, $db, $reportTo = null ) AS & TO: self::createIndex( $db, $type, "{$tableName}_index{$key}", $tableName, $columns, $reportTo ); IN LINES: if ( $db->indexInfo( $tableName, $indexName ) === false ) { $db->query( "CREATE $type $tableName ON $tableName USING btree($columns)", __METHOD__ ); } Next problem: relation "smw_ids_smw_id_seq" does not exist FILE: SemanticMediaWiki/includes/storage/SQLStore/SMW_Sql3SmwIds.php “smw_ids_smw_id_seq” renamed as “smw_object_ids_smw_id_seq” Thanks to “Comment #14 from Marcin Cieślak” Problem: ERROR: syntax error at or near ")" ...refreshPropertyStatistics */ FROM "smw_prop_stats" WHERE ) File: SemanticMediaWiki/includes/storage/SQLStore/SMW_SQLStore3_SetupHandlers.php $dbw->replace( SMWSQLStore3::PROPERTY_STATISTICS_TABLE, 'p_id', array ( 'p_id' => $row->smw_id, 'usage_count' => $usageCount ), __METHOD__ ); Causes function Repalce in file: mediawiki-1.21.3/includes/db/Database.php to generate a postgres sql syntactic error; ERROR: syntax error at or near ")" ...refreshPropertyStatistics */ FROM "smw_prop_stats" WHERE ) -- 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
