Project

General

Profile

HowTo make Wiki history working with Postgres 90 » History » Revision 10

Revision 5 (Florian Breitwieser, 2011-02-21 17:31) → Revision 10/30 (Etienne Massip, 2012-09-29 10:42)

h1. HowTo make Wiki history working with Postgres 9.0 

 h2. Problem 

 When accessing the history version of a Wiki page (e.g. Wiki?version=16), just a string which is not human readable is displayed. It starts like this and is about 5000 characters long: 

 <pre> 
 \x68312e204d532050726f63657373696e6720506970656 ... 
 </pre> 

 Same result for exporting TXT or HTML of the current version, and a Wiki-diff just diffs between two such strings. 

 h2. Solution 

 PostgreSQL 9 introduced a new 'hex' format for bytea data input and output. Default for output is now hex, but it can be easily reverted to the old 'escape' format with the following command: 

 <pre> 
 ALTER DATABASE redmine SET bytea_output TO 'escape'; 
 </pre> 

 See also #7677.