On Sun, 24 Nov 2013 16:53:01 +0200 RSmith <rsm...@rsweb.co.za> wrote:
> Similarly if one was to add a function which returns a date-dependant > value, such as 'dayOfWeek(x)' and mark it as deterministic for inside > a single query, that would make sense, even though it would be very > indeterministic (or referentially opaque, if you will) between > queries. This is all dandy unless you have queries (as seen on this > forum) that run for three days or more... would it matter then? A SQL statement is atomic irrespective of how long it runs. Your wday() function would return to the day of the week as of the time the statement was evaluated, even if it took a month of Sundays to execute. ;-) Another way to think about it: a deterministic function always returns the same output for a given input. In an SQL statement, a function is provided input only once, regardless of how long it runs. --jkl _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users