Page MenuHomePhabricator

SMW delimiter error on a sql insert
Closed, DeclinedPublic

Description

Author: gmaf

Description:
A new installation of SMW 1.5.6 on debian/Postgres give me an error at the insert when I publish MediaWiki page. SMW try to insert a number (col. value_num) with a comma delimiter ('2456545,8594792') instead of a point delimiter('2456545.8594792').

How can I fix it ?


A database error has occurred
Query: INSERT INTO smw_atts2 (s_id,p_id,value_xsd,value_num,value_unit) VALUES ('56','52','2013/9/10T08:37:39','2456545,8594792',0)
Function: SMW::updateDatasmw_atts2
Error: 1 ERREUR: syntaxe en entrée invalide pour le type double precision : « 2456545,8594792 »
LIGNE 1 : ...alue_unit) VALUES ('56','52','2013/9/10T08:37:39','2456545,8...
^

Backtrace:

#0 /usr/share/mediawiki/includes/db/Database.php(616): DatabasePostgres->reportQueryError('ERREUR: syntax...', 1, 'INSERT INTO smw...', 'SMW::updateData...', '')
#1 /usr/share/mediawiki/includes/db/DatabasePostgres.php(806): Database->query('INSERT INTO smw...', 'SMW::updateData...', '')
#2 /var/lib/mediawiki/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php(787): DatabasePostgres->insert('smw_atts2', Array, 'SMW::updateData...')


Version: unspecified
Severity: blocker
OS: Linux

Details

Reference
bz54595

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:13 AM
bzimport set Reference to bz54595.
bzimport added a subscriber: Unknown Object (MLST).

Why are you installing a SMW 1.5.6?! That release is quite obsolete. We are currently at 1.8.

Although pg support improvements have been made since 1.5.6, the latest release still does not officially support it. (It supports MySQL and SQLite).

Unknown Object (User) added a comment.Oct 23 2013, 5:46 PM

SMWSQLStore2 is no longer in support (for the current master) which also means that no fix will be provided for SMWSQLStore2.

It is suggested to update to SMW 1.8 (SMWSQLStore3) or above to see if the reported problem still occurs.

PostgreSQL is not officially supported (for progress on PostgreSQL see [1]).

Please reopen this ticket, if the issue still persists with SMWSQLStore3 and enabled PostgreSQL support.

[1] https://gerrit.wikimedia.org/r/#/c/91375/