Re: [sqlite] sqlite3_create_function xFinal argument called when there's an error?

2017-05-17 Thread Clemens Ladisch
Nelson, Erik - 2 wrote: > should any result be set in xFinal? Like sqlite3_result_error? Or the > previously-returned xStep error is sufficient? The sqlite3_result_xxx() documentation documents what happens when you call it multiple times (i.e., the later call overrides the earlier value).

Re: [sqlite] sqlite3_create_function xFinal argument called when there's an error?

2017-05-17 Thread Nelson, Erik - 2
> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On > Behalf Of Clemens Ladisch > Sent: Wednesday, May 17, 2017 2:36 AM > To: sqlite-users@mailinglists.sqlite.org > Subject: Re: [sqlite] sqlite3_create_function xFinal argument called when > there's an

Re: [sqlite] sqlite3_create_function xFinal argument called when there's an error?

2017-05-17 Thread Clemens Ladisch
Nelson, Erik - 2 wrote: > for aggregate functions, is xFinal called if there's an error? Yes; it's always called when SQLite cleans up the context. Regards, Clemens ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

[sqlite] sqlite3_create_function xFinal argument called when there's an error?

2017-05-16 Thread Nelson, Erik - 2
All- for aggregate functions, is xFinal called if there's an error? For example, in the percentile.c add-on function, percentStep has code like sqlite3_result_error(pCtx, "2nd argument to percentile() is not " "a number between 0.0 and 100.0", -1); If that error