Piwigo Bugtracker

Viewing Issue Advanced Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001737 [Piwigo] albums minor always 2010.06.21 23:46 2010.06.30 00:01
Reporter madman View Status public  
Assigned To nikrou
Priority normal Resolution fixed Platform Postgresql
Status closed   OS CentOS 5.4
Projection none   OS Version Postgresql 8.4.2
ETA none Fixed in Version 2.1.2 Product Version 2.1.1
  Target Version Product Build Trunk r6565
Summary 0001737: [PostgreSQL/SQlite] Concatenation error
Description When using the function array_to_string, PostgreSQL returns an error on the Permalink page. This caused by the ARRAY function that requires all datatypes to be the same.

Concatenating columns in PostgreSQL database (and others) can be done with the double pipe: ||.

Please rewrite the pwg_db_concat() function:

function pwg_db_concat($array)
{
  return implode($array, ' || ');
}
Steps To Reproduce New installation -> Administration -> Categories -> Permalinks
Additional Information Warning: pg_query() [function.pg-query]: Query failed: ERROR: ARRAY types integer and character varying cannot be matched LINE 4: ARRAY_TO_STRING(ARRAY[id,' - ',name]) AS name, ^ in /var/www/sites/fotos.aarjan.nl/piwigo/piwigo_svn/include/dblayer/functions_pgsql.inc.php on line 122
SELECT id, permalink, ARRAY_TO_STRING(ARRAY[id,' - ',name]) AS name, uppercats, global_rank FROM piwigo_categories
ERROR: ARRAY types integer and character varying cannot be matched LINE 4: ARRAY_TO_STRING(ARRAY[id,' - ',name]) AS name, ^
Tags No tags attached.
browser Mozilla
Database engine and version Postgresql 8.4.2
PHP version 5.3.2
Web server Apache 2.2.3
Attached Files

- Relationships

-  Notes
(0003989)
svn (reporter)
2010.06.22 23:18

[Subversion] r6580 by nikrou on trunk

-----[Subversion commit log]----------------------------------------------------
Bug 1737 fixed : Concatenation error with POstgreSQL
Simplify same function for SQLite
(0003990)
svn (reporter)
2010.06.22 23:19

[Subversion] r6581 by nikrou on branch 2.1

-----[Subversion commit log]----------------------------------------------------
Bug 1737 fixed : merge from trunk
Concatenation error with POstgreSQL
Simplify same function for SQLite

- Issue History
Date Modified Username Field Change
2010.06.21 23:46 madman New Issue
2010.06.21 23:46 madman browser => Mozilla
2010.06.21 23:46 madman MySQL version => Postgresql 8.4.2
2010.06.21 23:46 madman PHP version => 5.3.2
2010.06.21 23:46 madman Web server => Apache 2.2.3
2010.06.22 09:20 plg Status new => assigned
2010.06.22 09:20 plg Assigned To => nikrou
2010.06.22 23:18 svn Checkin
2010.06.22 23:18 svn Note Added: 0003989
2010.06.22 23:19 svn Checkin
2010.06.22 23:19 svn Note Added: 0003990
2010.06.22 23:20 nikrou Status assigned => closed
2010.06.22 23:20 nikrou Resolution open => fixed
2010.06.22 23:20 nikrou Fixed in Version => 2.1.2
2010.06.30 00:01 plg Summary Concatenation error => [PostgreSQL/SQlite] Concatenation error
2010.06.30 00:01 plg Additional Information Updated


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Contact
Powered by Mantis Bugtracker