Postgres9 introduced a configuration option 'bytea_output' that defaults to 'hex' with an alternate option of 'escape'. Prior releases produced escape'd by default.
If your Mantis installation uses $g_allow_file_upload=ON and $g_file_upload_method=DATABASE and your backend is 9.0 or above, you will not be able to view or download any bug attachments without doing some configuration first.(Note uploads/inserts are unaffected, only selecting bytea columns)
Simplest fix is to change the setting in postgresql.conf and restart/sighup your backend.
If you can't change the server setting, it can be overriden at the DB and/or user(role) level by running either of the following
Code: Select all
ALTER DATABASE <your $g_database_name here> SET bytea_output='escape';
ALTER ROLE <your $g_db_username> SET bytea_output='escape';