Sean Davis <[EMAIL PROTECTED]> writes: > On 3/22/06 2:39 PM, "Sean Davis" <[EMAIL PROTECTED]> wrote: >> On 3/22/06 1:36 PM, "John Siracusa" <[EMAIL PROTECTED]> wrote: >>> On 3/22/06, Sean Davis <[EMAIL PROTECTED]> wrote: >>>> Why is the type for "contents" a scalar? >>> >>> Because that's the default when there is not a more specific RDBO >>> column type mapped to whatever DBI returns for the column type. >>> >>>> I would like to store binary data in that column, which I can do >>>> with straight DBI, but it seems I have to specify the bind_type as >>>> DBD::Pg::PG_BYTEA. >>> >>> Is there no other way to use a bytea column using DBI? For example, >>> will it accept a base64 encoded string or something? If not, then >>> RDBO will have to be changed to add support for explicit bind types >>> for individual column values. > > Just tried it and Base64 encoding works fine. I can presumably > inflate and deflate within my RDBO class. Thanks for the idea.
Presumably that works because nothing in the Base64 string requires BYTEA encoding when you insert it.[1] On the negative side, you just expanded the storage consumed in your BYTEA column by twenty-five percent, by not storing direct binary data in there. Footnotes: [1] Assuming that my understanding of the column type is right, and that it hasn't changed in newer releases than 8.0 -- Digital Infrastructure Solutions -- making IT simple, stable and secure Phone: 0401 155 707 email: [EMAIL PROTECTED] ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object