mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-07 14:56:59 +02:00
When using SQLite 3, a blob column might return either string of byte vector values dynamically depending on the data itself, or maybe some more complex parameters controlled at data insert time. Hard-code the rule that a blob column returned as a string is in fact base64 encoded (which looks like common practice) and decode it automatically when needed, before sending to byte-vector-to-bytea. It might be a tad slow but at least the data is properly converted. In future, that decision might come and byte us in the back again, at which point it'll be necessary to consider full casting options as in the MySQL CAST rules. It seems like a big enough win for now if we can avoid that.
1.5 MiB
1.5 MiB