After attempting to install this module with a PostgreSQL database, I see the following error messages in the PostgreSQL log file (multiple times):
ERROR: function lpad(bigint, integer, unknown) does not exist at character 119
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
STATEMENT: SELECT count, bundle_md5, filename FROM (SELECT LPAD(COUNT(*), 8, '00000000') AS count, bundle_md5, filename_md5 FROM advagg_bundles WHERE root = 1 AND timestamp > 1319753642 GROUP BY filename_md5) AS ab INNER JOIN advagg_files AS af USING ( filename_md5 )
Anyway, from looking at the documentation for lpad() on PostgreSQL and MySQL, it looks like the first argument is supposed to be a string, whereas count() returns a bigint in PostgreSQL and MySQL. I've attached a patch that casts the return value from count as a char. It works on PostgreSQL, should work with MySQL.
Comments
Comment #1
mikeytown2 commentedComment #2
ChrisLaFrancis commentedSorry, this should be cast to varchar instead of char. New patch attached.
Also, the MySQL documentation for lpad() specifies that the first argument should be a string, too, so I'm not sure this issue is specific to PostgreSQL...
Comment #3
mikeytown2 commentedPatch above has been committed. Thanks!
Comment #4
mikeytown2 commentedheads up #1378640: Question with Error
Comment #5
ChrisLaFrancis commentedIt looks like MySQL can cast to a char, so how about we cast to char(8) instead of varchar? Patch attached.
Comment #6
mikeytown2 commentedVerified this time it works.
Last patch has been committed.
Thanks!