Piwigo Bugtracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001737Piwigoalbumspublic2010.06.21 23:462010.06.30 00:01
Reportermadman 
Assigned Tonikrou 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformPostgresqlOSCentOS 5.4OS VersionPostgresql 8.4.2
Product Version2.1.1 
Target VersionFixed in Version2.1.2 
Summary0001737: [PostgreSQL/SQlite] Concatenation error
DescriptionWhen 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 ReproduceNew installation -> Administration -> Categories -> Permalinks
Additional InformationWarning: 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, ^
TagsNo tags attached.
browserMozilla
Database engine and versionPostgresql 8.4.2
PHP version5.3.2
Web serverApache 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


Copyright © 2000 - 2015 MantisBT Team
Contact
Powered by Mantis Bugtracker