Marc Haber wrote:

> Please note that exim is so flexible that it is possible to implement
> mail spool storage in an SQL database. In this case, we'd write data
> which originated in an untrusted source to the database, not knowing
> about encoding at all.

If you are going to store things in multiple encodings and you don't
know (or don't want to waste time figuring out) which encoding each is
on, probably you should be using SQL_ASCII.  This means Postgres itself
will never try to mess with bytes (it will never recode stuff).  The
downside is that the sort order may be incorrect in some queries, but
I'm not sure if this is a great problem for a mail spool.

Otherwise you do have to declare the encoding you are going to enter
data in (using the client_encoding config option).  Not doing it causes
all sort of weird problems.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to