On Sun, Sep 15, 2013 at 1:58 PM, Yuriy Kaminskiy <yum...@gmail.com> wrote:

> Sure, there can be several way to interpret CURRENT_* and *('now').
> However,
> some of them can be useful (transaction, statement), and others (step) -
> cannot
> be. And some (sub-expression, the way it "works" currently) are purely
> insane.
>

i've been following this list since 2006 or 2007 and i can't remember
anyone every complaining about the current behaviour before. If the
behaviour bothers you, use a user-defined function which provides the
per-db/transaction/whatever behaviour your need. You could have implemented
it in the time you've expended bemoaning the current (well established, if
perhaps fundamentally flawed) behaviour.


where `2*2 <> 4`; using them them in product targeted to to general public
> would
> be insane; using them *randomly* (as it happens with CURRENT_TIME <>
> CURRENT_TIME) - beyond insane.
>

foo() == foo()

is never guaranteed to be true unless foo() is a pure function with no
inputs. i consider the current behaviour to be correct. It would never
occur to me to compare CURRENT_TIME to itself because it is, deep down
inside, a C function call which uses time-dependent, system-level state.
i.e. it's a perfect candidate for races. So avoid them, in the same way
that nobody should ever (in C) expect (time(0) == time(0)) to match 100% of
the ... time.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to