* D. Richard Hipp: > If an error occurs in a step function, record that fact in > the aggregate context. Then when the finalizer is called, > check the error flag in the context and call sqlite3_result_error > at that point if it is appropriate to do so.
Does this really work? According to my experiments, the fact that sqlite3_result_error has been called from the finalizer is ignored. The sources seem to lack the appropriate check, but I'm not sure.