HowTo make Wiki history working with Postgres 90 » History » Version 4
Florian Breitwieser, 2011-02-21 17:31
1 | 1 | Florian Breitwieser | h1. HowTo make Wiki history working with Postgres 9.0 |
---|---|---|---|
2 | |||
3 | 3 | Florian Breitwieser | h2. Problem |
4 | |||
5 | 2 | Florian Breitwieser | 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: |
6 | |||
7 | <pre> |
||
8 | 4 | Florian Breitwieser | \x68312e204d532050726f63657373696e6720506970656 ... |
9 | 2 | Florian Breitwieser | |
10 | </pre> |
||
11 | Same result for exporting TXT or HTML of the current version, and a Wiki-diff just diffs between two such strings. |
||
12 | |||
13 | 1 | Florian Breitwieser | h2. Solution |
14 | 3 | Florian Breitwieser | |
15 | 1 | Florian Breitwieser | 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: |
16 | |||
17 | <pre> |
||
18 | ALTER DATABASE redmine SET bytea_output TO 'escape'; |
||
19 | </pre> |
||
20 | |||
21 | See also #7677. |