"John W. Baxter" <[EMAIL PROTECTED]> on Thursday, October 27, 2005 at
1:22 AM +0000 wrote:
>On 10/26/05 6:06 PM, "Mark Sapiro" <[EMAIL PROTECTED]> wrote:
>
>> Actually, it is not really doing the right thing because it is not
>> supposed to be aware of what's in the _BounceInfo class. The info that
>> is passed to it is a string representation of the _BounceInfo
>> instance, and it should really just be saving and retrieving that.
>> IMO, there should be just one column in the MySQL table for this
>> string representation. The only possible snag I see is that the string
>> contains new-lines, and I don't know MySQL so I don't know if
>> new-lines are allowed in a string field/column.
>
>Based on these tests dashed off using one of Exim's debugging capabilities
>$ exim -be
>> ${quote_mysql: A\x0atest}
> A\ntest
>> ${quote_mysql: A\x0dtest}
> A\rtest
>the newlines are OK but have to be quoted (as do CR characters, and
>others).
>
>This, of course, assumes that Exim's quote_mysql operator is doing the
>right
>thing.
>
>The best thing would be to check the MySQL documentation (which I'm too
>lazy
>to do this evening).


Thank you John for the examples and suggestion to reference the MySQL
documentation.

It appears as though the MySQL VARCHAR type can preserve newlines
<http://dev.mysql.com/doc/refman/4.1/en/char.html>.  However trailing
space is removed in this data type.  If trailing space must be preserved,
one could use the MySQL TEXT type
<http://dev.mysql.com/doc/refman/4.1/en/blob.html>.

-Adrian

_______________________________________________
Mailman-Developers mailing list
Mailman-Developers@python.org
http://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=show&amp;file=faq01.027.htp

Reply via email to