Last modified: 2010-05-15 15:33:23 UTC
When installing under PostgreSQL (using directions from
http://ph3.defau.lt/index.php/PostgreSQL_Install), if the database encoding is
set to 'UNICODE', some problems are encountered inserting items into the
"objectcache" table. I believe the problem stems from using the 'text' column
type in PostgreSQL, versus a MEDIUMBLOB in MySQL. Perhaps 'bytea' should be
used instead? This does require some special formatting of the input, but is a
more analgous type to BLOBs.
Setting the database encoding to LATIN1 also avoids the problem (the 'text' type
then no longer looks for valid UTF-8 strings).
If the data is not UTF-8 encoded, then using LATIN1 client encoding will make
everything run smoothly. But the data stored in the database will in fact be
the unicode translations of those characters you are storing. This means that
the higher bytes are being stored as 2 or 3 bytes in unicode. This wastes space
and requires the data to be decoded when fetched and encoded when stored.
You can save yourself a lot of headache by making the database use latin1.
This field is currently bytea, (and it does cost us some contortions), so I am
closing the bug for now.