[Tickets #10919] Postgresql 9.0 bytea output is hex and should be escape
bugs at horde.org
bugs at horde.org
Thu Jan 12 14:01:53 UTC 2012
BITTE NICHT AUF DIESE NACHRICHT ANTWORTEN. NACHRICHTEN AN DIESE
E-MAIL-ADRESSE WERDEN NICHT GELESEN.
Ticket-URL: http://bugs.horde.org/ticket/10919
------------------------------------------------------------------------------
Ticket | 10919
Erstellt Von | alex at ksz.ch
Zusammenfassung | Postgresql 9.0 bytea output is hex and should be escape
Warteschlange | Horde Base
Version | 4.0.13
Typ | Bug
Status | Unconfirmed
Priorität | 1. Low
Milestone |
Patch |
Zuständige |
------------------------------------------------------------------------------
alex at ksz.ch (2012-01-12 14:01) hat geschrieben:
In PostgreSQL 9.xx bytea values have hex as default output, but horde
expects escape.
(http://www.postgresql.org/docs/9.0/static/release-9-0.html)
With "ALTER DATABASE horde SET bytea_output = 'escape'; " you can
change the output postgresql uses.
If this isn't done. all pref_values in horde_prefs are corrupted. I
had the problem when updating horde groupware webmail edition from
4.0.3 to 4.0.4 and 4.0.5.
If I got this correctly the following happened:
4.0.3 -> 4.0.4
horde changed from using plaintext values in pref_value to using
binary values, without changing the type of pref_value (it had still
the type text). This wasn't that big a problem. the values looked
somehow weird, but it worked quite a while.
4.0.4 -> 4.0.5
pref_value was changed from type text to type binary, also converting
all the values. This lead to corrupted values. The pref_value field
had the correct information in it, but also a lot of completely
useless information (mostly long sequences of the number 3, some other
numbers mixed in from time to time. A single pref_value had more than
1 million signs alltough only a name and an e-mail address were
stored). This happened because postgresql sent the bytea values as hex
instead of escape format.
Changing the bytea_output from hex to bytea solves the problem. So the
following line should be in the update scripts and in the create
database script for postgresql 9.0
ALTER DATABASE horde SET bytea_output = 'escape';
More information about the bugs
mailing list