From: Robert T. <ro...@xz...> - 2013-01-24 05:28:26
|
I spoke with ioguix a few days ago on irc about releasing a new version of PPA, and that I had hoped to take another crack at solving the bytea problem. For those not familiar with it, the quick summary is that if you attempt to insert or edit bytea data via PPA, it will modify the data so that essentially you end up with corrupted data. Unfortunately, the way PPA works, just editing another field of a bytea row will also cause PPA to also update the bytea column, as we update all values for a given row when any value is updated. Now, I've tried a few different methods of trying to fix this, but could come up with no working set of escape and unescape options that would prevent this. (And as a note, it's made trickier because you have to support multiple encoding formats, though I came up with workarounds for that). At this point, I'm somewhat of the opinion it can't be done. Now, I'd be happy for someone else to take a look and show me the error of my ways, but barring that, I've spent the last few days trying to come up with a work-around. My initial idea was to just not allow editing of bytea data via PPA, but I've run into some problems there as well, for example, if you don't allow inserts of bytea data, then anyone who has a not null bytea column would never be able to insert row data into their table. That doesn't really seem like a good option. So, barring someone figuring out a way to make this actually work, we need to come up with a better work-around, or I guess just release the next version with his bug in place. FWIW, this bug is in the current stable version of PPA, so we're not making things worse, but it's kind of frightening to know we have a subtle data corrupting behavior in PPA. Thoughts? -- Robert Treat conjecture: xzilla.net consulting: omniti.com |