Jeroen Vermeulen
Jeroen Vermeulen
You're right, that's always been a problem waiting to happen... I think at the time I thought that the backend would quote such strings. I also just discovered another thing...
That'll work fine with a single connection. The only complication I see is that you want a transaction boundary between the query at the head of the loop, and the...
Yes, `query()` downloads all the rows and stores them in memory, but that's got nothing to do with storing the result in a variable. That's just the documented behaviour of...
AFAICT the "SELECT ... FOR UPDATE" runs outside of any transaction. Which means that that statement runs as a transaction of its own, which commits immediately when the statement completes.
Can you say precisely why you would expect a "begin()" to help with your problem?
I tweaked the transaction docs a bit to make this clearer and mention RAII.
Yup, the problem is exactly that in order to handle strings correctly, we _need_ to know the encoding that applies to that specific connection at that time. The solution does...
I'm sorry not to have a better answer for you @dpriedel... Is it at least an answer that you can live with, knowing the reason the way it works like...
Glad to hear it, thanks!
I'll close this ticket. People searching for solutions to the same problem will still be able to find it, but it will no longer be listed as an open issue.