On Mon, Sep 16, 2013 at 10:21 AM, Ryan Johnson
<ryan.john...@cs.utoronto.ca>wrote:

> Rhetorical question: if sqlite3's behavior were tightened up would anybody
> complain? Is there any possible use case where replacing the current
> random-ish behavior with something consistent would change an application?
> Seems like the requested behavior happens on accident often enough that no
> current application could rely on its failure to appear.
>

There are perhaps 2 million applications in the wild that use SQLite, so it
will be difficult to check them all. But one can easily imagine that one or
more of those two million applications does something like this:

     SELECT current_timestamp, * FROM tab;

And then runs sqlite3_step() every five or ten seconds in a background
process to fetch a new row, and expects the timestamp on each row to
reflect the actual time of retrieval from disk.  Causing 'now' to mean
exactly the same time for an entire SQL statement would break such
applications.

As a compromise, the current SQLite trunk causes 'now' to be exactly the
same for all date and time functions within a single sqlite3_step() call.


-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to