When running
sudo -u wwwrun php /srv/www/htdocs-wiki-doku/extensions/SemanticMediaWiki/maintenance/rebuildData.php -d 100
I get the following error:
Database error occured.
Query: INSERT INTO "smw_di_blob" (s_id,p_id,o_blob,o_hash) VALUES ('1764','933','C:\Program Files (x86)\AnotherFolderHere\AndAnotherFolderHereToo\AndTheNameOfTheFileHere.exe','C:\Program Files (x86)\AnotherFolderHerea30462340362b7e3c3073054bd572471')
Funktion: SMW::writePropertyTableRowUpdates-insert-smw_di_blob
Fehler: 22P02 ERROR: invalid input syntax for typ bytea
LINE 1: ...b" (s_id,p_id,o_blob,o_hash) VALUES ('1764','933','C:\Progra...
I have a Semantic Forms form where I can save a file-path. Typ of the property is "text".
Resulting pages look like this for example:
{{Windows Service
|Name=JustATest
|Path=C:\Program Files (x86)\AnotherFolderHere\AndAnotherFolderHereToo\AndTheNameOfTheFileHere.exe
|StartupType=Automatic
|LogonUser=hwe,
|Hostname=ABCDEF01, ABCDEF02,
|Description=It does something
}}
It seems it has something to do with the length of the "path" combined with backslashes, but I'm not quite sure. Shorter "paths" do work. Or short paths with backslashes.
Fehler: 22P02 ERROR: invalid input syntax for typ bytea
This error relates to [0] caused by how postgres is handling escaped \ character for table columns that use the bytea type. SMW uses bytea on o_blob fields that contain text strings longer than MAX_HASH_LENGTH [1] chars.
[0] https://stackoverflow.com/questions/28631807/postgresql-error-invalid-input-syntax-for-type-bytea
[1] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/includes/storage/SQLStore/SMW_DIHandler_Blob.php#L34
Expected to be solved by #1885 (added an extra integration test with > MAX_HASH_LENGTH)
Most helpful comment
This error relates to [0] caused by how postgres is handling escaped
\character for table columns that use thebyteatype. SMW usesbyteaono_blobfields that contain text strings longer thanMAX_HASH_LENGTH[1] chars.[0] https://stackoverflow.com/questions/28631807/postgresql-error-invalid-input-syntax-for-type-bytea
[1] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/includes/storage/SQLStore/SMW_DIHandler_Blob.php#L34